File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 3535 if [ -f "setup.py" ]; then
3636 sed -i "s/version=['\"][^'\"]*['\"]/version='${VERSION}'/g" setup.py
3737 fi
38- if [ -f "pyproject.toml" x ]; then
38+ if [ -f "pyproject.toml" ]; then
3939 sed -i "s/version = \"[^\"]*\"/version = \"${VERSION}\"/g" pyproject.toml
4040 fi
4141 if [ -f "__init__.py" ]; then
Original file line number Diff line number Diff line change 2222 env :
2323 GITHUB_TOKEN : ${{ secrets.TAG_TOKEN }}
2424 WITH_V : true
25- - name : Update package version
26- if : steps.tag.outputs.new_tag
27- run : |
28- # Extract version without the 'v' prefix
29- VERSION=${GITHUB_REF_NAME#v}
30- # For a Python package
31- sed -i "s/version=.*,/version='${VERSION}',/" setup.py
32- # OR for projects using pyproject.toml
33- # sed -i "s/version = .*/version = \"${VERSION}\"/" pyproject.toml
34-
35- git config --local user.email "action@github.com"
36- git config --local user.name "GitHub Action"
37- git add .
38- git commit -m "chore: bump version to ${VERSION}"
39- git push
You can’t perform that action at this time.
0 commit comments