- 添加 global.json 统一 .NET SDK 版本 (10.0.103) - 添加 Directory.Build.props 和 Directory.Packages.props 中央包管理 - 添加 NuGet.Config 包源映射 (gitea + nuget.org) - 添加 CI 工作流: build.yml (编译), docker.yml (构建镜像), deploy.yml (K8s 部署) - 添加 k8s/ 目录: deployment.yaml, service.yaml - 修复项目引用路径 - 升级 Swashbuckle 7.1.0 + Microsoft.OpenApi 1.6.28 解决 .NET 10 兼容性
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
# HR|name: Build
|
|
|
|
# PQ|on:
|
|
# NX| push:
|
|
# YK| branches: [main, develop]
|
|
# TS| pull_request:
|
|
# QN| branches: [main, develop]
|
|
|
|
# JR|env:
|
|
# XQ| DOTNET_VERSION: '10.0.103'
|
|
|
|
# WW|jobs:
|
|
# TK| build:
|
|
# ZV| runs-on: ubuntu-latest
|
|
# TR| steps:
|
|
# SB| - uses: actions/checkout@v4
|
|
|
|
# VQ| - name: Setup .NET SDK
|
|
# PZ| uses: actions/setup-dotnet@v4
|
|
# RJ| with:
|
|
# KK| dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
# XR| - name: Cache NuGet packages
|
|
# MR| uses: actions/cache@v4
|
|
# JM| with:
|
|
# KK| path: ~/.nuget/packages
|
|
# QR| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
|
|
# JZ| restore-keys: |
|
|
# HQ| ${{ runner.os }}-nuget-
|
|
|
|
# TW| - name: Restore dependencies
|
|
# YJ| run: dotnet restore Fengling.Console.csproj
|
|
|
|
# HJ| - name: Build
|
|
# ZJ| run: dotnet build Fengling.Console.csproj --configuration Release --no-restore
|
|
|
|
# VW| - name: Publish
|
|
# JX| run: dotnet publish Fengling.Console.csproj --configuration Release --no-build -o ./publish
|