File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 release :
55 types :
66 - published
7+ workflow_dispatch :
8+ inputs :
9+ release_tag :
10+ description : GitHub Release tag to upload assets to, for example v0.12.6.
11+ required : true
12+ type : string
13+ checkout_ref :
14+ description : Optional branch, tag, or commit SHA to build. Defaults to the selected workflow ref.
15+ required : false
16+ type : string
717
818permissions :
919 contents : write
2030 steps :
2131 - name : Checkout
2232 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+ with :
34+ ref : ${{ github.event.inputs.checkout_ref || github.ref }}
2335
2436 - name : Setup Node.js
2537 uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3143 run : |
3244 set -euo pipefail
3345 PACKAGE_VERSION="$(node -p "JSON.parse(require('node:fs').readFileSync('package.json', 'utf8')).version")"
34- TAG_NAME="${{ github.event.release.tag_name }}"
46+ TAG_NAME="${{ github.event.release.tag_name || github.event.inputs.release_tag }}"
3547 VERSION="${TAG_NAME#v}"
3648 if [ "$VERSION" != "$PACKAGE_VERSION" ]; then
3749 echo "Release tag $TAG_NAME does not match package.json version $PACKAGE_VERSION" >&2
You can’t perform that action at this time.
0 commit comments