File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
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
You can’t perform that action at this time.
0 commit comments