Skip to content

Commit ff6170d

Browse files
committed
fix(release): allow manual builds without a tag ref
1 parent 00cccef commit ff6170d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ on:
2424
tag:
2525
description: "Release tag to upload to (e.g. v2.4.0)"
2626
required: true
27+
ref:
28+
description: "Git ref to build from for manual runs (branch, tag, or SHA)"
29+
required: false
30+
default: "main"
2731

2832
permissions:
2933
contents: write # needed to upload release assets
3034

3135
env:
3236
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
37+
BUILD_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.ref }}
3338

3439
jobs:
3540
# ── Windows installer (.exe) ────────────────────────────────────────────────
@@ -41,7 +46,7 @@ jobs:
4146
- name: Checkout
4247
uses: actions/checkout@v4
4348
with:
44-
ref: ${{ env.RELEASE_TAG }}
49+
ref: ${{ env.BUILD_REF }}
4550
fetch-depth: 0
4651

4752
- name: Setup Node.js

0 commit comments

Comments
 (0)