1717 fail-fast : false
1818 matrix :
1919 python-version :
20- - 3.8
2120 - 3.9
2221 - ' 3.10'
2322 - ' 3.11'
5958 # Fetch all history instead of the latest commit
6059 fetch-depth : 0
6160 - name : Get and set version in env
62- run : echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
61+ run : |
62+ python scripts/write-version.py
63+ echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
6364 - name : Print current version
6465 run : echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
6566 - name : Tag commit
@@ -76,10 +77,12 @@ jobs:
7677 - name : Set up Python
7778 uses : actions/setup-python@v2
7879 with :
79- python-version : 3.8
80+ python-version : 3.9
8081 - name : Remove version file
8182 # This is just in case something else created it, destroy it to get a fresh version
8283 run : rm -f buildrunner/version.py
84+ - name : Write version file
85+ run : python scripts/write-version.py
8386 - name : Install wheel
8487 run : pip install wheel build
8588 - name : Build
@@ -103,7 +106,9 @@ jobs:
103106 # Fetch all history instead of the latest commit
104107 fetch-depth : 0
105108 - name : Get and set version in env
106- run : echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
109+ run : |
110+ python scripts/write-version.py
111+ echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
107112 - name : Print current version
108113 run : echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
109114 - name : Docker Tags
0 commit comments