Skip to content

Commit 120d206

Browse files
committed
ci: Improve publish workflow
1 parent 390837f commit 120d206

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ jobs:
3232

3333
- name: Extract version
3434
id: get_version
35+
env:
36+
EVENT_NAME: ${{ github.event_name }}
37+
RELEASE_TAG: ${{ github.event.release.tag_name }}
38+
REF_NAME: ${{ github.ref_name }}
3539
run: |
3640
# Get clean version from the tag or release
37-
if [[ "${{ github.event_name }}" == "release" ]]; then
41+
if [[ "$EVENT_NAME" == "release" ]]; then
3842
# For releases, get the version from the release tag
39-
TAG_NAME="${{ github.event.release.tag_name }}"
43+
TAG_NAME="$RELEASE_TAG"
4044
else
4145
# For tags, get version from the tag
42-
TAG_NAME="${{ github.ref_name }}"
46+
TAG_NAME="$REF_NAME"
4347
fi
4448
4549
# Remove 'v' prefix

0 commit comments

Comments
 (0)