Skip to content

Commit 6771edf

Browse files
authored
feat(release): add version override input to release workflow (#913)
Allow specifying an explicit version when triggering the release workflow, useful for retrying a half-failed publish where some packages were already published with the auto-computed version.
1 parent f383359 commit 6771edf

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
options:
1212
- latest
1313
- alpha
14+
version:
15+
description: 'Override version (leave empty to auto-compute). Use when retrying a failed publish.'
16+
required: false
17+
default: ''
18+
type: string
1419

1520
permissions: {}
1621

@@ -32,10 +37,15 @@ jobs:
3237
fetch-depth: 0
3338
fetch-tags: true
3439
- uses: ./.github/actions/set-snapshot-version
35-
id: version
40+
if: ${{ inputs.version == '' }}
41+
id: computed
3642
with:
3743
npm_tag: ${{ inputs.npm_tag }}
3844

45+
- name: Set final version
46+
id: version
47+
run: echo "version=${{ inputs.version || steps.computed.outputs.version }}" >> $GITHUB_OUTPUT
48+
3949
build-rust:
4050
runs-on: ${{ matrix.settings.os }}
4151
needs: prepare

0 commit comments

Comments
 (0)