File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1818 release :
1919 types : [published]
2020 workflow_dispatch : {} # Allow manual trigger
21+ workflow_call : {} # Allow triggering from other worfkflows
2122
2223concurrency :
2324 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -156,6 +157,7 @@ jobs:
156157 upload-pre-release-wheels :
157158 name : Create release and upload artifacts
158159 runs-on : ubuntu-latest
160+ if : github.ref_name == 'main'
159161 permissions :
160162 contents : write
161163 needs :
@@ -221,6 +223,34 @@ jobs:
221223 - run : pip install auditwheel
222224 - run : python ./.github/scripts/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY
223225
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+
224254# test:
225255# needs:
226256# - build-wheels
You can’t perform that action at this time.
0 commit comments