File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
- name : Publish Python distribution to PyPI and TestPyPI
1
+ name : Publish to PyPI
2
2
3
- on : push
3
+ on :
4
+ release :
5
+ types : [published]
4
6
5
7
jobs :
6
8
build-n-publish :
7
- name : Build and Publish Python distribution to PyPI and TestPyPI
9
+ name : Build and Publish to PyPI
8
10
runs-on : ubuntu-latest
11
+ if : startsWith(github.ref, 'refs/tags')
9
12
steps :
10
13
- uses : actions/checkout@master
11
14
- name : Set up Python 3.10
18
21
- name : Build a binary wheel and a source tarball
19
22
run : >-
20
23
python -m build --sdist --wheel --outdir dist/
21
- - name : Publish Distribution to Test PyPI
22
- uses : pypa/gh-action-pypi-publish@release/v1
23
- with :
24
- password : ${{ secrets.TESTPYPI_API_TOKEN }}
25
- repository_url : https://test.pypi.org/legacy/
26
24
- name : Publish Distribution to PyPI
27
- if : startsWith(github.ref, 'refs/tags')
28
25
uses : pypa/gh-action-pypi-publish@release/v1
29
26
with :
30
27
password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments