File tree 1 file changed +20
-14
lines changed
1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change
1
+ name : " Publish Python 🐍 distributions 📦 to PyPI"
1
2
2
- ---
3
- name : Release
4
-
5
- on : [push]
3
+ on :
4
+ release :
5
+ types :
6
+ - published
6
7
7
8
jobs :
8
- release :
9
+ build-n-publish-pypi :
10
+ name : Build and publish Python 🐍 distributions 📦 to PyPI
9
11
runs-on : ubuntu-latest
10
12
steps :
11
13
- uses : actions/checkout@v4
12
- - uses : actions/setup-python@v5
14
+ with :
15
+ fetch-depth : 0
16
+ - name : Set up Python 3.9
17
+ uses : actions/setup-python@v5
18
+ with :
19
+ python-version : 3.9
13
20
- name : Install dependencies
14
21
run : |
15
- python -m pip install -U pip wheel setuptools setuptools-scm twine
16
- - name : Build distributions
22
+ python -m pip install --upgrade pip
23
+ python -m pip install setuptools setuptools-scm wheel twine check-manifest
24
+ - name : Build a binary wheel and a source tarball
17
25
run : python setup.py sdist bdist_wheel
18
-
19
- - name : Publish to PyPI
20
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
21
- uses : pypa/gh-action-pypi-publish@master
26
+ - name : Publish distribution 📦 to PyPI
27
+ uses : pypa/gh-action-pypi-publish@release/v1
22
28
with :
23
- user : ${{ secrets.PYPI_USERNAME }}
24
- password : ${{ secrets.PYPI_PASSWORD }}
29
+ user : __token__
30
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments