File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ name: Continuous Delivery
33on :
44 release :
55 types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ description : ' Version to release, matching the release tag (e.g., v1.2.3)'
10+ required : true
11+ type : string
612
713permissions :
814 contents : read
@@ -18,10 +24,13 @@ jobs:
1824 with :
1925 node-version : " 22"
2026 registry-url : " https://registry.npmjs.org"
27+ # RELEASE_VERSION is the v-prefixed tag (e.g. v3.0.3) on a release, or the
28+ # manual input on dispatch. The leading "v" lands in package.json but npm
29+ # strips it on publish, so the published version is clean (e.g. 3.0.3).
2130 - name : Bump version to release
2231 run : sed -i "s/v0.0.0/$RELEASE_VERSION/" ./package.json
2332 env :
24- RELEASE_VERSION : ${{ github.ref_name }}
33+ RELEASE_VERSION : ${{ github.event_name == 'workflow_dispatch' && inputs.version || github. ref_name }}
2534 - name : Install dependencies required to build package
2635 run : npm ci
2736 - name : Build package
You can’t perform that action at this time.
0 commit comments