File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 18
18
release :
19
19
types : [published]
20
20
workflow_dispatch : {} # Allow manual trigger
21
+ workflow_call : {} # Allow triggering from other worfkflows
21
22
22
23
concurrency :
23
24
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -156,6 +157,7 @@ jobs:
156
157
upload-pre-release-wheels :
157
158
name : Create release and upload artifacts
158
159
runs-on : ubuntu-latest
160
+ if : github.ref_name == 'main'
159
161
permissions :
160
162
contents : write
161
163
needs :
@@ -221,6 +223,34 @@ jobs:
221
223
- run : pip install auditwheel
222
224
- run : python ./.github/scripts/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY
223
225
226
+ publish-wheels :
227
+ name : Publish wheels to PyPI
228
+ needs : [build-wheels, audit-wheels]
229
+ runs-on : ubuntu-latest
230
+ if : |
231
+ github.repository == 'bitsandbytes-foundation/bitsandbytes'
232
+ && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
233
+ environment :
234
+ name : release
235
+ url : https://pypi.org/p/bitsandbytes
236
+ permissions :
237
+ id-token : write
238
+ steps :
239
+ - name : Download distribution artifacts
240
+ uses : actions/download-artifact@v4
241
+ with :
242
+ path : dist/
243
+ pattern : " bdist_wheel_*"
244
+ merge-multiple : true
245
+
246
+ - name : Remove macOS wheels
247
+ run : rm dist/*macos*
248
+
249
+ - name : Publish to PyPI
250
+ uses : pypa/gh-action-pypi-publish@release/v1
251
+ with :
252
+ print-hash : true
253
+
224
254
# test:
225
255
# needs:
226
256
# - build-wheels
You can’t perform that action at this time.
0 commit comments