fix: 从git tag提取版本号并传递给dotnet pack
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 21s

This commit is contained in:
movingsam 2026-03-01 01:26:56 +08:00
parent 3ee366ffdf
commit 6426a13852

View File

@ -22,13 +22,18 @@ jobs:
with:
dotnet-version: "10.0.x"
- name: Get version from tag
if: startsWith(github.ref, 'refs/tags/v')
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Pack Domain
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages --version-suffix ""
run: dotnet pack Fengling.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages -p:PackageVersion=${{ steps.version.outputs.VERSION }}
- name: Pack Infrastructure
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages --version-suffix ""
run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages -p:PackageVersion=${{ steps.version.outputs.VERSION }}
- name: Push to Gitea
if: startsWith(github.ref, 'refs/tags/v')