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
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ release-build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.x"
20+
21+ - name : Install dependencies
22+ run : pip install build wheel
23+
24+ - name : Build release distributions
25+ run : python -m build
26+
27+ - name : Upload distributions
28+ uses : actions/upload-artifact@v4
29+ with :
30+ name : release-dists
31+ path : dist/
32+
33+ pypi-publish :
34+ runs-on : ubuntu-latest
35+ needs : release-build
36+ permissions :
37+ id-token : write # Required for trusted publishing
38+ environment :
39+ name : pypi
40+ url : https://pypi.org/project/gsm-infinite/${{ github.event.release.name }} # Update with your project name
41+
42+ steps :
43+ - name : Retrieve release distributions
44+ uses : actions/download-artifact@v4
45+ with :
46+ name : release-dists
47+ path : dist/
48+
49+ - name : Publish release distributions to PyPI
50+ uses : pypa/gh-action-pypi-publish@release/v1
51+ with :
52+ packages-dir : dist/
53+ password : ${{ secrets.PYPI_API_TOKEN }} # Use a secret for your PyPI API token
You can’t perform that action at this time.
0 commit comments