We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcdb5a8 commit e947af7Copy full SHA for e947af7
1 file changed
.github/workflows/tag.yaml
@@ -17,7 +17,23 @@ jobs:
17
with:
18
fetch-depth: '0'
19
- name: Bump version and push tag
20
+ id: tag
21
uses: anothrNick/github-tag-action@master
22
env:
23
GITHUB_TOKEN: ${{ secrets.TAG_TOKEN }}
24
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
0 commit comments