Skip to content

Commit

Permalink
chore: use a prefix for release tag
Browse files Browse the repository at this point in the history
It's useful to differentiate the tag between the stable or the release candidate.
  • Loading branch information
jacderida committed Aug 2, 2024
1 parent b606051 commit e300f8d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ jobs:
name: github release
runs-on: ubuntu-latest
needs: [ build ]

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@master
Expand Down Expand Up @@ -178,6 +177,16 @@ jobs:
shell: bash
run: cargo binstall --no-confirm just

- name: set stable release prefix
if: ${{ github.ref == 'refs/heads/stable' }}
run: |
echo "RELEASE_PREFIX=stable" >> $GITHUB_ENV
- name: set rc release prefix
if: ${{ startsWith(github.ref, 'refs/heads/rc') }}
run: |
echo "RELEASE_PREFIX=rc" >> $GITHUB_ENV
- name: set package version
shell: bash
run: |
Expand All @@ -198,7 +207,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.VERSION_BUMP_COMMIT_PAT }}
with:
tag_name: ${{ env.PACKAGE_VERSION }}
tag_name: ${{ env.RELEASE_PREFIX }}-${{ env.PACKAGE_VERSION }}
release_name: ${{ env.PACKAGE_VERSION }}
draft: false
prerelease: ${{ startsWith(github.ref, 'refs/heads/rc') && true || false }}
Expand Down

0 comments on commit e300f8d

Please sign in to comment.