File tree Expand file tree Collapse file tree 2 files changed +47
-64
lines changed
Expand file tree Collapse file tree 2 files changed +47
-64
lines changed Original file line number Diff line number Diff line change 1+ name : Release Stage Build
2+
3+ on :
4+ push :
5+ branches :
6+ - update-workflow-for-pypi
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v3
18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v4
21+ with :
22+ python-version : 3.11
23+
24+ - name : Install dependencies
25+ run : sudo apt-get install make
26+
27+ - name : Create virtual environment
28+ run : make venv
29+
30+ - name : Build package
31+ run : |
32+ set -x
33+ source venv/bin/activate
34+ rm -rf build dist *.egg-info
35+ make build ENV=stage
36+
37+ - name : Install Twine
38+ run : |
39+ source venv/bin/activate
40+ pip install twine
41+
42+ - name : Upload to PyPI
43+ env :
44+ PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
45+ run : |
46+ source venv/bin/activate
47+ twine upload dist/* -u __token__ -p $PYPI_API_TOKEN
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments