Skip to content

Commit

Permalink
Use the package version from the tag instead of the csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarzon committed Nov 13, 2023
1 parent 3438ec2 commit d91c2d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/Release_Package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ jobs:
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

- name: Build
run: dotnet build --configuration Release

- name: Create the package
run: dotnet pack --configuration Release
run: dotnet pack --configuration Release -p:PackageVersion=${{ steps.get_version.outputs.VERSION }}

- name: Publish the package to GPR
working-directory: ./src/Pinch.SDK
run: dotnet nuget push ./bin/Release/*.nupkg

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Publish Github Release
uses: marvinpinto/[email protected]
with:
title: ${{ steps.get_version.outputs.VERSION }}
title: v${{ steps.get_version.outputs.VERSION }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: ./bin/Release/*.nupkg
2 changes: 1 addition & 1 deletion src/Pinch.SDK/Pinch.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageIconUrl>https://raw.githubusercontent.com/PinchPayments/Pinch.SDK/master/assets/img/circle_logo_64x64.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/PinchPayments/Pinch.SDK</PackageProjectUrl>
<RepositoryUrl>https://github.com/PinchPayments/Pinch.SDK</RepositoryUrl>
<Version>0.22.0</Version>
<Version>$(PackageVersion)</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit d91c2d8

Please sign in to comment.