Skip to content

Commit

Permalink
Fixed version formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adamthewilliam committed Sep 30, 2024
1 parent 91a00f2 commit 6bc20aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pack-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ jobs:
- name: Build
run: dotnet build ${{ env.SOLUTION_DIR }} --configuration Release --no-restore

## - name: Set version from tag
## run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set version and trim 'v' prefix
run: |
$version = "${{ github.ref_name }}" -replace '^v', ''
echo "VERSION=$version" >> $env:GITHUB_ENV
echo "Set VERSION to $version"
- name: Pack
run: dotnet pack ${{ env.SOLUTION_DIR }} --configuration Release --no-build -p:PackageVersion=${{github.ref_name}} --output ./nupkgs
run: dotnet pack ${{ env.SOLUTION_DIR }} --configuration Release --no-build -p:PackageVersion=${{env.VERSION}} --output ./nupkgs

- name: Publish to NuGet
run: dotnet nuget push "./nupkgs/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate

0 comments on commit 6bc20aa

Please sign in to comment.