Skip to content

Commit 9c63b2b

Browse files
Antony BaileyAntony Bailey
authored andcommitted
ver update
1 parent 20f6c10 commit 9c63b2b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/release-tags.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ jobs:
3030
3131
- name: Extract tag name
3232
id: tag
33-
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
33+
run: |
34+
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
35+
# Remove 'v' prefix if present for version
36+
echo "VERSION_NAME=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
3437
3538
- name: Update version in setup.py
3639
run: |
37-
# Remove 'v' prefix if present
38-
VERSION="${{ steps.tag.outputs.TAG_NAME }}"
39-
VERSION=${VERSION#v}
40-
sed -i "s/version=['\"][^'\"]*['\"]/version='$VERSION'/g" setup.py
40+
# Replace version in setup.py with the tag version
41+
sed -i "s/version=\".*\"/version=\"${{ steps.tag.outputs.VERSION_NAME }}\"/g" setup.py
4142
4243
- name: Build and package
4344
run: |

0 commit comments

Comments
 (0)