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