Skip to content

Commit f94a300

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 f0bba0f commit f94a300

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
@@ -24,6 +30,7 @@ jobs:
2430
srcFolder: "./src"
2531
minverMinimumMajorMinor: '10.2'
2632
bump: ${{ inputs.bump }}
33+
ref: ${{ inputs.sourceRef }}
2734
secrets:
2835
CERTUM_USER_ID: ${{ secrets.CERTUM_USER_ID }}
2936
CERTUM_OTP_URI: ${{ secrets.CERTUM_OTP_URI }}
@@ -63,3 +70,4 @@ jobs:
6370
with:
6471
version: ${{ needs.release.outputs.semver2 }}
6572
tag: ${{ needs.release.outputs.tag }}
73+
target: ${{ needs.release.outputs.sourceSha }}

0 commit comments

Comments
 (0)