@@ -18,25 +18,17 @@ jobs:
1818 - uses : actions/checkout@v4
1919
2020 - name : Set up Python
21- uses : actions/setup-python@v4
21+ uses : actions/setup-python@v5
2222 with :
23- python-version : 3.11
23+ python-version : " 3.11"
2424
25- - name : Upgrade pip version
25+ - name : Install build dependencies
2626 run : |
27- python -m pip install -U pip
28-
29- - name : Install wheel
30- run : |
31- python -m pip install wheel
32-
33- - name : Install setuptools
34- run : |
35- python -m pip install setuptools
27+ python -m pip install -U pip build
3628
3729 - name : Build wheel and source distribution
3830 run : |
39- python setup.py bdist_wheel sdist
31+ python -m build
4032
4133 - name : Publish package to PyPI
4234 uses : pypa/gh-action-pypi-publish@master
4638 packages_dir : ${{ github.workspace }}/dist
4739
4840 - name : Parse version
49- run : echo "version=$(python3 -c 'from autowrap.version import __version__ as v ; print("%d.%d.%d" % v )')" >> $GITHUB_OUTPUT
41+ run : echo "version=$(python3 -c 'from autowrap.version import __version__; print(__version__ )')" >> $GITHUB_OUTPUT
5042 id : version
5143
5244 - name : Create github release
7163 cat CHANGELOG.md >> HISTORY.md
7264 echo >> HISTORY.md
7365 rm CHANGELOG.md && echo "autowrap $NEXT_VER" > CHANGELOG.md
74- sed -i -e "s/^[[:space:]]*__version__.*/__version__ = \(${NEXT_VER//./, }\)/g" autowrap/version.py
66+ # Update string version
67+ sed -i -e "s/^__version__ = \".*\"/__version__ = \"$NEXT_VER\"/g" autowrap/version.py
68+ # Update tuple version for backward compatibility
69+ TUPLE_VER=$(echo $NEXT_VER | sed 's/\./, /g')
70+ sed -i -e "s/^__version_tuple__ = (.*)/__version_tuple__ = ($TUPLE_VER)/g" autowrap/version.py
7571
7672 - uses : stefanzweifel/git-auto-commit-action@v4.15.2
7773 with :
0 commit comments