diff --git a/.gitea/workflows/nuget.yml b/.gitea/workflows/nuget.yml index 2f0b5bd..5293248 100644 --- a/.gitea/workflows/nuget.yml +++ b/.gitea/workflows/nuget.yml @@ -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')