File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release on PyPI
2+
3+ # on:
4+ # workflow_dispatch:
5+ # push:
6+ # tags:
7+ # - v*
8+
9+ jobs :
10+ build-release :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+ - uses : actions/setup-python@v5
17+ with :
18+ python-version : ' 3.13'
19+ - name : Build wheel
20+ run : |
21+ pip install build twine
22+ python -m build
23+ python -m twine check dist/*
24+ - name : Upload Python package dist artifacts
25+ uses : actions/upload-artifact@v4
26+ with :
27+ name : python-package-dist
28+ path : dist
29+
30+ pypi-publish :
31+ name : Upload release to PyPI
32+ runs-on : ubuntu-latest
33+ needs : build-release
34+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
35+ environment :
36+ name : pypi
37+ url : https://pypi.org/p/clang
38+ permissions :
39+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
40+ steps :
41+ - name : Download Python package dist artifacts
42+ uses : actions/download-artifact@v4
43+ with :
44+ name : python-package-dist
45+ path : dist
46+ - name : Publish package distributions to PyPI
47+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments