File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy package to PyPI
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+
13+ - uses : actions/setup-python@v3
14+ with :
15+ python-version : 3.11
16+
17+ - name : Update version in pyproject.toml from current git tag
18+ run : >-
19+ sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF/refs\/tags\/v/}/g" pyproject.toml
20+
21+ - run : |
22+ pip install build
23+ python -m build
24+
25+ - uses : actions/upload-artifact@v3
26+ with :
27+ path : ./dist
28+
29+ deploy :
30+ needs : ['build']
31+ environment : ' pypi'
32+
33+ name : upload release to PyPI
34+ runs-on : ubuntu-latest
35+ permissions :
36+ # IMPORTANT: this permission is mandatory for trusted publishing
37+ id-token : write
38+ steps :
39+ - uses : actions/download-artifact@v3
40+
41+ - name : Publish package distributions to PyPI
42+ uses : pypa/gh-action-pypi-publish@release/v1
43+ with :
44+ packages_dir : artifact/
You can’t perform that action at this time.
0 commit comments