Skip to content

Commit ec29340

Browse files
committed
Add tag input to release-build workflow_dispatch
Allows manually dispatching a release build for a specific tag, producing versioned binaries (not snapshot) for that tag. Co-authored-by: Isaac
1 parent bfde237 commit ec29340

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
- "bugbash-*"
1111

1212
workflow_dispatch:
13+
inputs:
14+
tag:
15+
description: "Tag to build (e.g. v1.2.3). Leave empty for a snapshot build of the current ref."
16+
type: string
17+
required: false
1318

1419
jobs:
1520
cli:
@@ -30,6 +35,7 @@ jobs:
3035
with:
3136
fetch-depth: 0
3237
fetch-tags: true
38+
ref: ${{ inputs.tag || github.ref }}
3339

3440
- name: Setup JFrog
3541
uses: ./.github/actions/setup-jfrog
@@ -78,7 +84,7 @@ jobs:
7884
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
7985
with:
8086
version: v2.14.3
81-
args: release --skip=publish ${{ !startsWith(github.ref, 'refs/tags/') && '--snapshot' || '' }}
87+
args: release --skip=publish ${{ (startsWith(github.ref, 'refs/tags/') || inputs.tag) && '' || '--snapshot' }}
8288

8389
- name: Verify Windows binary signatures
8490
run: |
@@ -114,6 +120,7 @@ jobs:
114120
with:
115121
fetch-depth: 0
116122
fetch-tags: true
123+
ref: ${{ inputs.tag || github.ref }}
117124

118125
- name: Setup JFrog
119126
uses: ./.github/actions/setup-jfrog

0 commit comments

Comments
 (0)