Skip to content

Commit 28cdb49

Browse files
committed
fix: extract correct version number
1 parent c55c196 commit 28cdb49

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ jobs:
3030

3131
- name: Extract version from tag
3232
id: version
33-
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
33+
run: |
34+
TAG_NAME=${GITHUB_REF#refs/tags/}
35+
VERSION=${TAG_NAME#v}
36+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
37+
echo "Extracted version: ${VERSION}"
3438
3539
- name: Update version in __init__.py
3640
run: |
37-
sed -i 's/VERSION_NUMBER/${{ steps.version.outputs.VERSION }}/g' laygo/__init__.py
41+
sed -i 's|VERSION_NUMBER|${{ steps.version.outputs.VERSION }}|g' laygo/__init__.py
3842
echo "Updated version to ${{ steps.version.outputs.VERSION }}"
3943
cat laygo/__init__.py
4044

0 commit comments

Comments
 (0)