fengling-console/.gitea/workflows/build.yml
movingsam 7bf4c41e41
Some checks failed
Build / build (push) Failing after 1m19s
Deploy to K8s / deploy (push) Failing after 3s
Build and Push Docker / build (push) Failing after 19s
fix: 修复 CI/CD workflow 文件 YAML 语法错误
- 移除错误的语法前缀 #XX|#
- 确保 workflow 文件可被 GitHub Actions 正确解析
2026-02-28 18:07:20 +08:00

39 lines
936 B
YAML

name: Build
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
env:
DOTNET_VERSION: '10.0.103'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore src/Fengling.Console.csproj
- name: Build
run: dotnet build src/Fengling.Console.csproj --configuration Release --no-restore
- name: Publish
run: dotnet publish src/Fengling.Console.csproj --configuration Release --no-build -o ./publish