Skip to content

Commit 2c6df2a

Browse files
committed
ci(release): allow releasing from a historical ref
Add an optional 'sourceRef' workflow_dispatch input (default empty = this branch, normally main). When set to a tag/branch/SHA it is passed to the reusable release workflow's 'ref' so historical source is built and signed with the current pipeline, and the new release tag is pinned to that commit via 'target'.
1 parent 1ba6f00 commit 2c6df2a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ on:
1212
- minor
1313
- major
1414

15+
sourceRef:
16+
description: 'Optional git ref (tag/branch/SHA) to release from. Leave blank to release from this branch (normally main).'
17+
required: false
18+
type: string
19+
default: ''
20+
1521
permissions:
1622
contents: write
1723
id-token: write
@@ -25,6 +31,7 @@ jobs:
2531
installWorkloads: true
2632
minverMinimumMajorMinor: '12.1'
2733
bump: ${{ inputs.bump }}
34+
ref: ${{ inputs.sourceRef }}
2835
secrets:
2936
CERTUM_USER_ID: ${{ secrets.CERTUM_USER_ID }}
3037
CERTUM_OTP_URI: ${{ secrets.CERTUM_OTP_URI }}
@@ -65,3 +72,4 @@ jobs:
6572
with:
6673
version: ${{ needs.release.outputs.semver2 }}
6774
tag: ${{ needs.release.outputs.tag }}
75+
target: ${{ needs.release.outputs.sourceSha }}

0 commit comments

Comments
 (0)