Skip to content

Commit

Permalink
dotnet/nbgv action
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry committed Feb 26, 2022
1 parent 6d8bc5f commit 6b3c39a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Install nbgv
run: dotnet tool install nbgv --tool-path ./tools
- name: Run nbgv
run: echo "NUGET_PACKAGE_VERSION=$(./tools/nbgv get-version -v NuGetPackageVersion)" >> $GITHUB_ENV
- name: Nerdbank.GitVersioning
uses: dotnet/[email protected]
id: nbgv
- name: Install dependencies
run: dotnet restore
- name: Pack
Expand All @@ -31,10 +30,10 @@ jobs:
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(env.NUGET_PACKAGE_VERSION, '-preview') }}
title: Release ${{ env.NUGET_PACKAGE_VERSION }}
automatic_release_tag: ${{ env.NUGET_PACKAGE_VERSION }}
prerelease: ${{ steps.nbgv.outputs.PrereleaseVersion != '' }}
title: Release ${{ steps.nbgv.outputs.NuGetPackageVersion }}
automatic_release_tag: ${{ steps.nbgv.outputs.NuGetPackageVersion }}
files: |
./out/*
- name: Push to Nuget.org
run: dotnet nuget push ${{ format('./out/Neo.BlockchainToolkit.Library.{0}.nupkg', env.NUGET_PACKAGE_VERSION) }} --api-key ${{ secrets.NUGET_ORG_TOKEN }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push ${{ format('./out/Neo.BlockchainToolkit.Library.{0}.nupkg', steps.nbgv.outputs.NuGetPackageVersion) }} --api-key ${{ secrets.NUGET_ORG_TOKEN }} --source https://api.nuget.org/v3/index.json

0 comments on commit 6b3c39a

Please sign in to comment.