fengling-platform/.gitea/workflows/nuget.yml
movingsam 140d844f70
All checks were successful
Publish NuGet Packages / build (push) Successful in 13s
fix: 修复 CI 环境变量名称
2026-03-01 00:03:37 +08:00

37 lines
1.0 KiB
YAML

name: Publish NuGet Packages
on:
push:
branches: [main]
tags:
- "v*"
env:
GITEA_API_TOKEN: ${{ secrets.GITEA_API_TOKEN }}
GITEA_URL: https://gitea.shtao1.cn
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Pack Domain
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages
- name: Pack Infrastructure
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages
- name: Push to Gitea
if: startsWith(github.ref, 'refs/tags/v')
run: |
for pkg in ./packages/*.nupkg; do
dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/fengling/go/__index" --skip-duplicate
done