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+ # NOTE-1: This action builds the py pkg as per a pixi command `pixi run build`
2+ # and publishes it to PyPI. Requires org / repo / action / env setup
3+ # as a trusted publisher.
4+ # NOTE-2: this can be copy and pasted between repos without edit
5+ # provided that the repo name and pypi pkg name are the same
6+ name : Publish to PyPI
7+
8+ on :
9+ push :
10+ tags :
11+ - ' *'
12+ - ' !rc*' # Exclude release candidates
13+
14+ jobs :
15+
16+ pypi-publish :
17+ name : Upload release to PyPI
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : prefix-dev/setup-pixi@v0.8.10
22+ with :
23+ pixi-version : v0.49.0
24+ cache : true
25+ cache-write : ${{ github.event_name == 'push' && github.ref_name == 'main' }}
26+ - run : pixi run build
27+ - name : Publish package distributions to PyPI
28+ uses : pypa/gh-action-pypi-publish@release/v1
29+ environment :
30+ name : pypi
31+ url : https://pypi.org/p/${{ github.action.repository }}
32+ permissions :
33+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
You can’t perform that action at this time.
0 commit comments