Skip to content

Commit

Permalink
Changed nuget workflow version parsing to use an action
Browse files Browse the repository at this point in the history
  • Loading branch information
BLM16 committed Aug 3, 2022
1 parent 8d6cacd commit ebca484
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ jobs:
with:
configuration: Release

# Get the Release's name and strip the v from vx.x.x
# Get the library version specified in the csproj file
- name: Parse Version
uses: kzrnm/get-net-sdk-project-versions-action@v1
id: parse-version
run: |
version=${release:1}
echo "::set-output name=version::$version"
shell: bash
env:
release: ${{ github.event.release.name }}
with:
proj-path: Calculator/Calculator.csproj

- name: Push to NuGet.org
run: dotnet nuget push ./Calculator/bin/Release/BLM16.Util.Calculator.${{ steps.parse-version.outputs.version }}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate

0 comments on commit ebca484

Please sign in to comment.