Skip to content

Commit

Permalink
Fix publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
qboileau committed Apr 11, 2024
1 parent 21953d0 commit 4cc8438
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish release
run-name: Publish release ${GITHUB_REF#refs/*/} on ${{ github.sha }} by @${{ github.actor }}
run-name: Publish release ${{ github.ref_name }} on ${{ github.sha }} by @${{ github.actor }}

on:
push:
Expand All @@ -14,16 +14,17 @@ jobs:
contents: read
packages: write
steps:
- name: Get the Github Release version
run: |
ref=${GITHUB_REF#refs/*/}
git show-ref --verify refs/tags/${ref} || { echo "Ref ${GITHUB_REF} is not a tag" ; exit 1; }
echo "RELEASE_VERSION=${ref}" >> "$GITHUB_ENV"
- name: Checkout tag ${{ env.RELEASE_VERSION }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_VERSION }}

- name: Check release version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
else
echo "Ref ${GITHUB_REF} is not a tag"
exit 1
fi
- name: Set up JDK 21
uses: actions/setup-java@v4
Expand Down

0 comments on commit 4cc8438

Please sign in to comment.