@@ -17,14 +17,14 @@ jobs:
1717
1818 - uses : actions/setup-python@v6
1919 with :
20- python-version : 3.10
20+ python-version : " 3.10"
2121 architecture : x64
2222
2323 - name : Autobump version
2424 run : |
2525 # from refs/tags/v1.2.3 get 1.2.3
2626 VERSION=${GITHUB_REF/refs\/tags\//}
27- PLACEHOLDER='version = "0 .1.0"'
27+ PLACEHOLDER='__version__ = "v0 .1.0"'
2828 VERSION_FILE='src/machine_stats/_version.py'
2929
3030 # grep ensures the placeholder is there. If grep doesn't find the placeholder
4646 TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
4747 run : |
4848 twine upload --verbose -u '__token__' dist/*
49- virt_stats :
50- name : Virt Stats PyPI Upload
51- runs-on : ubuntu-latest
52- defaults :
53- run :
54- working-directory : libvirt
55-
56- steps :
57- - uses : actions/checkout@v2
58-
59- - uses : actions/setup-python@v3
60- with :
61- python-version : 3.8
62- architecture : x64
63-
64- - name : Autobump version
65- run : |
66- # from refs/tags/v1.2.3 get 1.2.3
67- VERSION=${GITHUB_REF/refs\/tags\//}
68- PLACEHOLDER='version="develop"'
69- VERSION_FILE='setup.py'
70-
71- # grep ensures the placeholder is there. If grep doesn't find the placeholder
72- # it exits with exit code 1 and github actions aborts the build.
73- grep "$PLACEHOLDER" "$VERSION_FILE"
74-
75- sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/g" "$VERSION_FILE"
76-
77- - name : Install pypa/build and twine
78- run : |
79- python -m pip install build twine
80-
81- - name : Build a binary wheel and a source tarball
82- run : |
83- python -m build --sdist --wheel --outdir dist/ .
84-
85- - name : Upload to PyPI via Twine
86- env :
87- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
88- run : |
89- twine upload --verbose -u '__token__' dist/*
0 commit comments