From c9904354d5adb46b5d9730587a9595164f6e21ab Mon Sep 17 00:00:00 2001 From: Vinnie Fialok Date: Wed, 3 Jul 2024 11:49:49 +1000 Subject: [PATCH] alternative tag extraction using battila action --- .github/workflows/release.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70de59a8..4bb6d721 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,15 +16,11 @@ jobs: name: Build - Release runs-on: ubuntu-latest + steps: - - name: Extract tag name - id: tag_name - uses: actions/github-script@v3.0.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - result-encoding: string - script: | - return context.payload.ref.replace(/^refs\/tags\//, ''); + - name: Extract Version + id: version + uses: battila/get-version-action@v2 - name: Checkout uses: actions/checkout@v3 @@ -43,7 +39,7 @@ jobs: run: dotnet build --configuration Release - name: Create NuGet Packages - run: dotnet pack --configuration Release /p:CommitID=${{ github.sha }} /p:TagVersion=${{ steps.tag_name.outputs.result }} + run: dotnet pack --configuration Release /p:CommitID=${{ github.sha }} /p:TagVersion=${{ steps.version.outputs.version-without-v }} # Upload package as an atrifact to the GitHub action - name: Upload packages