File tree Expand file tree Collapse file tree 1 file changed +12
-21
lines changed
Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Original file line number Diff line number Diff line change 11# This workflow will install Python dependencies, run tests and lint with a single version of Python
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
4- name : Publish release to pypi
4+ name : Publish release to PyPI
55
66on :
77 release :
8- types :
9- - created
8+ types : [published]
109
1110jobs :
1211 build :
13-
1412 runs-on : ubuntu-latest
15-
1613 steps :
1714 - uses : actions/checkout@v2
18- - name : Set up Python 3.9
15+ - name : Set up Python
1916 uses : actions/setup-python@v2
2017 with :
21- python-version : 3.9
18+ python-version : ' 3.x '
2219 - name : Install dependencies
2320 run : |
2421 python -m pip install --upgrade pip
25-
22+ python -m pip install --upgrade build twine
2623 - name : Build the package
2724 run : |
28- echo "Installing and upgrading build and twine"
29- python3 -m pip install --user --upgrade build twine
30- echo "Package the project"
31- python3 -m build
32- - name : Prepare pypi settings
33- run : |
34- echo "[pypi]" >~/.pypirc
35- echo "username = __token__" >>~/.pypirc
36- echo "password = ${{ secrets.PYPI_PUSH }}" >>~/.pypirc
37- - name : Upload to pypi
38- run : |
39- echo "Uploading to pypi"
40- python -m twine upload dist/*
25+ python -m build
26+ twine check
27+ - name : Publish a Python distribution to PyPI
28+ uses : pypa/gh-action-pypi-publish@release/v1
29+ with :
30+ user : __token__
31+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments