File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,16 +22,31 @@ jobs:
2222
2323 steps :
2424 - uses : actions/checkout@v4
25+
26+ - name : Extract version from tag
27+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
28+
29+ - name : Update version in setup.py
30+ uses : jacobtomlinson/gha-find-replace@v2
31+ with :
32+ find : " version='[0-9]+\\ .[0-9]+\\ .[0-9]+'"
33+ replace : " version='${{ env.VERSION }}'"
34+ regex : true
35+ include : ' setup.py'
36+
2537 - name : Set up Python
2638 uses : actions/setup-python@v3
2739 with :
2840 python-version : ' 3.x'
41+
2942 - name : Install dependencies
3043 run : |
3144 python -m pip install --upgrade pip
3245 pip install build
46+
3347 - name : Build package
3448 run : python -m build
49+
3550 - name : Publish package
3651 uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
3752 with :
You can’t perform that action at this time.
0 commit comments