File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : build
22on :
33 workflow_call :
4+ inputs :
5+ checkout_ref :
6+ description : Git ref containing the package sources to build
7+ required : false
8+ type : string
49
510jobs :
611 # Build python wheels
2631 with :
2732 fetch-depth : 0
2833 persist-credentials : false
34+ ref : ${{ inputs.checkout_ref || github.ref }}
2935 - uses : actions/setup-python@v6
3036 with :
3137 python-version : " 3.12"
3541 run : >-
3642 echo LIBCST_NO_LOCAL_SCHEME=1 >> $GITHUB_ENV
3743 - name : Enable building wheels for pre-release CPython versions
38- if : github.event_name != 'release'
44+ if : github.event_name != 'release' && github.event_name != 'workflow_dispatch'
3945 run : echo CIBW_ENABLE=cpython-prerelease >> $GITHUB_ENV
4046 - name : Build wheels
4147 uses : pypa/cibuildwheel@v4.0.0rc1
Original file line number Diff line number Diff line change 55 types : [published]
66 push :
77 branches : [main]
8+ workflow_dispatch :
9+ inputs :
10+ release_ref :
11+ description : Git tag or commit containing the release sources
12+ required : true
13+ type : string
814
915permissions :
1016 contents : read
1117
1218jobs :
1319 build :
1420 uses : Instagram/LibCST/.github/workflows/build.yml@main
21+ with :
22+ checkout_ref : ${{ inputs.release_ref || github.ref }}
1523 upload_release :
1624 name : Upload wheels to pypi
1725 runs-on : ubuntu-latest
2331 with :
2432 fetch-depth : 0
2533 persist-credentials : false
34+ ref : ${{ inputs.release_ref || github.ref }}
2635 - name : Download binary wheels
2736 id : download
2837 uses : actions/download-artifact@v5
5564 packages-dir : ${{ steps.download.outputs.download-path }}
5665 skip-existing : true
5766 - name : Publish distribution 📦 to PyPI
58- if : github.event_name == 'release'
67+ if : github.event_name == 'release' || github.event_name == 'workflow_dispatch'
5968 uses : pypa/gh-action-pypi-publish@release/v1
6069 with :
6170 packages-dir : ${{ steps.download.outputs.download-path }}
You can’t perform that action at this time.
0 commit comments