File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 11name : Publish
22
33on :
4- release :
5- types : [published]
4+ workflow_dispatch :
5+ inputs :
6+ ref :
7+ # require SHA as tags and branches are mutable
8+ description : Git commit SHA (not branch/tag)
9+ required : true
10+ type : string
611
712env :
813 FORCE_COLOR : 1
1217 runs-on : ubuntu-latest
1318
1419 steps :
20+ - name : Log inputs
21+ run : echo "${{ inputs }}"
22+
1523 - name : Checkout repository
1624 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+ with :
26+ ref : ${{ inputs.ref }}
27+ fetch-depth : 2 # shouldn't need much, if any, history
28+
29+ - name : Log Git tag
30+ run : git describe --always --tags
31+
32+ - name : Check ref is the commit SHA
33+ # require SHA as tags and branches are mutable
34+ run : test "${{ inputs.ref }}"
35+ = "$(git git log --max-count=1 --format=format:%h)"
36+ || test "${{ inputs.ref }}"
37+ = "$(git git log --max-count=1 --format=format:%H)"
1738
1839 # pipx is pre-installed in 'ubuntu' VMs
1940
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ Release Process
1515
1616#. Add a `release on GitHub <https://github.com/pypa/packaging/releases >`__.
1717
18- This schedules a CI workflow which will build and publish the package to
19- PyPI. Publishing will wait for any `required approvals `_.
18+ #. Run the 'Publish' manual GitHub workflow, specifying the Git tag's commit
19+ SHA. This will build and publish the package to PyPI. Publishing will wait
20+ for any `required approvals `_.
2021
2122#. Notify the other project owners of the release.
2223
You can’t perform that action at this time.
0 commit comments