File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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 : |
You can’t perform that action at this time.
0 commit comments