Skip to content

Commit

Permalink
版本输出
Browse files Browse the repository at this point in the history
  • Loading branch information
bit365 committed Nov 24, 2024
1 parent 9a944e7 commit 4e99320
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET 8.x
uses: actions/setup-dotnet@v4
Expand All @@ -27,14 +29,13 @@ jobs:
dotnet-version: 9.0.x

- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool

- name: Add GitVersion to PATH
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '6.x'

- name: Generate Version
id: gitversion
run: gitversion /output json /showvariable FullSemVer
- name: Determine Version
id: version_step # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]

- name: Restore dependencies
run: dotnet restore
Expand All @@ -45,7 +46,7 @@ jobs:
working-directory: ${{ env.PROJECT_DIR }}

- name: Pack
run: dotnet pack --configuration Release --no-build --output ./nupkg /p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }}
run: dotnet pack --configuration Release --no-build --output ./nupkg /p:PackageVersion=${{ steps.version_step.outputs.fullSemVer }}
working-directory: ${{ env.PROJECT_DIR }}

- name: Upload NuGet package
Expand Down

0 comments on commit 4e99320

Please sign in to comment.