Skip to content

Commit e9c886d

Browse files
committed
fix: update release workflow to allow manual triggering and adjust Node.js version
1 parent 25ee743 commit e9c886d

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/release-on-merge.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
11
name: Create Tag and Release on Merge
22

33
# This workflow creates a tag and GitHub Release when a release PR is merged to main
4-
# Triggered when PR with title starting with "release:" is merged to main
4+
# It can also be triggered manually after a merge if the PR title was incorrect.
55

66
on:
77
pull_request:
88
types: [closed]
99
branches:
1010
- main
11+
workflow_dispatch:
1112

1213
jobs:
1314
create-tag-and-release:
14-
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:')
15+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:'))
1516
runs-on: ubuntu-latest
1617
permissions:
1718
contents: write
1819
pull-requests: read
1920
steps:
20-
- name: Checkout
21+
- name: Checkout main
22+
if: github.event_name != 'workflow_dispatch'
2123
uses: actions/checkout@v4
2224
with:
2325
fetch-depth: 0
2426
ref: main
2527

28+
- name: Checkout selected ref
29+
if: github.event_name == 'workflow_dispatch'
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
2634
- name: Setup Node.js
2735
uses: actions/setup-node@v4
2836
with:
29-
node-version: 20
37+
node-version: 24
3038

3139
- name: Enable Corepack
3240
run: corepack enable

0 commit comments

Comments
 (0)