@@ -2,20 +2,24 @@ name: Build & Publish Wheels + Source
22
33on :
44 release :
5- types : [published]
5+ types :
6+ - published
7+ workflow_dispatch :
68
79permissions :
810 contents : read
11+
912
1013jobs :
11- build_wheels :
12- name : Build wheels on ${{ matrix.os }}
13- runs-on : ${{ matrix.os }}
14+ build_source :
15+ if : github.repository_owner == 'move-coop'
16+ environment : release
17+
18+ runs-on : ubuntu-latest
1419
15- strategy :
16- fail-fast : false
17- matrix :
18- os : [ubuntu-latest, windows-latest, macos-latest]
20+ permissions :
21+ # IMPORTANT: this permission is mandatory for trusted publishing
22+ id-token : write
1923
2024 steps :
2125 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2731 cache : " pip"
2832
2933 - name : Install uv
30- uses : install-pinned/uv@b9511b633710c8bbe8ba48376771dba624746799 # 0.4.12
34+ uses : install-pinned/uv@05389e8b8c79922b1376aee8c2d598b3219da230 # 0.4.12
3135
3236 - name : Install dependencies
3337 run : |
@@ -39,46 +43,14 @@ jobs:
3943 python setup.py check
4044
4145 - name : Build src dist
42- if : ${{ matrix.os == 'ubuntu-latest' }}
4346 run : |
44- python -m build --sdist --outdir wheels parsons
45-
46- - name : Build wheels
47- run : git pull && python -m cibuildwheel parsons/ --output-dir wheels
48-
49- # Save wheels as artifacts
50- - name : Upload built wheels
51- uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
52- with :
53- name : wheels-${{ matrix.os }}
54- path : wheels
55-
56- publish_wheels :
57- if : github.repository_owner == 'move-coop'
58- needs : build_wheels
59-
60- runs-on : ubuntu-latest
61- environment : release
62-
63- permissions :
64- # IMPORTANT: this permission is mandatory for trusted publishing
65- id-token : write
66-
67- steps :
68- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
69-
70- - name : Download wheels
71- uses : actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
72- with :
73- pattern : wheels-*
74- path : wheels
75- merge-multiple : true
47+ python -m build --sdist --outdir dist
7648
7749 # Publish
7850 - name : Publish
7951 uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
8052 with :
8153 verify-metadata : true
8254 skip-existing : true
83- packages-dir : wheels
55+ packages-dir : dist
8456 verbose : true
0 commit comments