File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Upload Python Package
1+ name : Publish Python Package
22
33on :
4- release :
5- types : [created]
4+ push :
5+ tags :
6+ - ' v*' # This triggers the workflow only when a tag is pushed. Adjust according to your versioning scheme.
67
78jobs :
8- deploy :
9+ build :
910 runs-on : ubuntu-latest
11+
1012 steps :
11- - uses : actions/checkout@v4
12- - name : Set up Python
13- uses : actions/setup-python@v5
14- with :
15- python-version : ' 3.x'
16- - name : Install dependencies
17- run : |
18- python -m pip install --upgrade pip
19- pip install setuptools wheel twine
20- - name : Build and publish
21- env :
22- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
23- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
24- run : |
25- make release
26-
27- - name : Publish Documentation
28- run : |
29- pip install -r requirements-docs.txt
30- pip install -e .
31- mkdocs gh-deploy --force
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : run tests
17+ run : |
18+ python tests.py
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v2
22+ with :
23+ python-version : ' 3.10'
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install setuptools wheel twine
29+
30+ - name : Build package
31+ run : python setup.py sdist bdist_wheel
32+
33+ - name : Publish package to PyPI
34+ env :
35+ TWINE_USERNAME : __token__
36+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
37+ run : twine upload dist/*
38+
39+ - name : Clean up
40+ run : rm -rf dist build *.egg-info
You can’t perform that action at this time.
0 commit comments