Skip to content

Commit

Permalink
Trying to get the tag name right
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed May 31, 2024
1 parent b4e18f7 commit 22c8c89
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
uses: actions/checkout@v3

- name: Extract Tag Name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
id: extract_tag_name # Assigning an ID to this step
run: echo "::set-output name=tag_name::${GITHUB_REF#refs/tags/}"

- name: Set Environment Variable (Windows)
if: matrix.runner == 'windows-latest'
Expand Down Expand Up @@ -71,14 +72,20 @@ jobs:
echo "BIN_RELEASE_VERSIONED: $BIN_RELEASE_VERSIONED"
mv "${BIN_OUTPUT}" "./${BIN_RELEASE_VERSIONED}"
echo "BIN_RELEASE_VERSIONED=${BIN_RELEASE_VERSIONED}" >> $GITHUB_ENV


- name: Output Tag Name
run: echo "tag_name=${{ env.TAG_NAME }}" >> $GITHUB_ENV
if: success()

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.BIN_RELEASE_VERSIONED }}
path: ${{ env.BIN_RELEASE_VERSIONED }}

outputs:
tag_name: ${{ steps.extract_tag_name.outputs.tag_name }}

create_release:
needs: build
runs-on: ubuntu-latest
Expand All @@ -99,8 +106,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: "Release ${{ env.TAG_NAME }}"
tag_name: ${{ needs.build.outputs.tag_name }}
release_name: "Release ${{ needs.build.outputs.tag_name }}"
draft: false
prerelease: false

Expand Down

0 comments on commit 22c8c89

Please sign in to comment.