File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7+ - " *deploy*"
78 release :
89 types :
910 - published
1011
1112jobs :
1213 build :
1314 if : github.repository == 'pytest-dev/iniconfig'
14- runs-on : ubuntu-20.04
15+ runs-on : ubuntu-latest
1516
1617 steps :
1718 - uses : actions/checkout@v3
18- - run : |
19- git fetch --prune --unshallow
20-
19+ with :
20+ fetch-depth : 0
2121 - name : Cache
2222 uses : actions/cache@v3
2323 with :
2424 path : ~/.cache/pip
25- key : deploy-${{ hashFiles('**/setup.py ') }}
25+ key : deploy-${{ hashFiles('**/pyproject.toml ') }}
2626 restore-keys : |
2727 deploy-
2828
@@ -31,17 +31,22 @@ jobs:
3131 with :
3232 python-version : " 3.x"
3333
34- - name : Install dependencies
34+ - name : Install build + twine
35+ run : python -m pip install build twine setuptools_scm
36+
37+ - name : git describe output
38+ run : git describe --tags
39+
40+ - id : scm_version
3541 run : |
36- python -m pip install -U pip
37- python -m pip install -U setuptools setuptools_scm twine wheel
42+ VERSION=$( python -m setuptools_scm --strip-dev)
43+ echo SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION >> $GITHUB_ENV
3844
3945 - name : Build package
40- run : |
41- git tag
42- python setup.py --version
43- python setup.py sdist --format=gztar bdist_wheel
44- twine check dist/*
46+ run : python -m build
47+
48+ - name : twine check
49+ run : twine check dist/*
4550
4651 - name : Publish package to PyPI
4752 if : github.event.action == 'published'
5156 password : ${{ secrets.pypi_password }}
5257
5358 - name : Publish package to TestPyPI
54- uses : pypa/gh-action-pypi-publish@master
59+ uses : pypa/gh-action-pypi-publish@release/v1
5560 with :
5661 user : __token__
5762 password : ${{ secrets.test_pypi_password }}
You can’t perform that action at this time.
0 commit comments