Skip to content

Commit

Permalink
Changed tag extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
thetestgame committed Nov 29, 2024
1 parent abb1d44 commit 00d9de8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@ jobs:
nuget update -self
# Extract the version from the tag
- name: Extract version from tag
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Extract tag name
id: tag
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.replace(/\/refs\/tags\//, '');
# Build and Package binaries
- name: Build and Package binaries
env:
VERSION: ${{ env.version }}
run: |
dotnet build -t:BatchBuild Standalone/Steamworks.NET.Standard.sln /p:Version=$VERSION
nuget pack Standalone/Steamworks.NET.nuspec -OutputDirectory bin\ -Version=$VERSION
dotnet build -t:BatchBuild Standalone/Steamworks.NET.Standard.sln /p:Version=${{ steps.tag.outputs.result }}
nuget pack Standalone/Steamworks.NET.nuspec -OutputDirectory bin\ -Version ${{ steps.tag.outputs.result }}
# Publish the NuGet package
- name: Publish to NuGet
Expand Down

0 comments on commit 00d9de8

Please sign in to comment.