Skip to content

Commit 45e2418

Browse files
allow a manual run of the release for debugging stuff with npm and tokens (#130)
1 parent f919ead commit 45e2418

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Continuous Delivery
33
on:
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

713
permissions:
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

0 commit comments

Comments
 (0)