File tree Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Expand file tree Collapse file tree 1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- release :
5- types : [published]
6-
7- # Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
8- jobs :
9- release :
10- name : Upload release to PyPI
4+ deploy :
5+ # this will run when you have tagged a commit, starting with "v*"
6+ # and requires that you have put your twine API key in your
7+ # github secrets (see readme for details)
8+ needs : [test]
119 runs-on : ubuntu-latest
12- environment :
13- name : pypi
14- url : https://pypi.org/p/{{ cookiecutter.package_name }}
15- permissions :
16- id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
10+ if : contains(github.ref, 'tags')
1711 steps :
18- - uses : actions/checkout@v4
19- with :
20- filter : blob:none
21- fetch-depth : 0
22- - uses : actions/setup-python@v4
12+ - name : Checkout code
13+ uses : actions/checkout@v3
14+
15+ - name : Set up Python 3.10
16+ uses : actions/setup-python@v4
2317 with :
24- python-version : " 3.x"
25- cache : " pip"
26- - run : pip install build
27- - run : python -m build
28- - name : Publish package distributions to PyPI
18+ python-version : " 3.10"
19+
20+ - name : Install hatch
21+ run : pip install hatch
22+
23+ - name : Build project for distribution
24+ run : hatch build
25+
26+ - name : Publish a Python distribution to PyPI
2927 uses : pypa/gh-action-pypi-publish@release/v1
28+ with :
29+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments