Skip to content

Commit 993d993

Browse files
committed
chore: add release safeguard for major releases
1 parent 9775c45 commit 993d993

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ on:
2222
- beta
2323
- rc
2424
prerelease_increment:
25-
description: 'Pre-release number (e.g., 1 for alpha1). Leave empty to auto-increment or start at 1.'
25+
description: "Pre-release number (e.g., 1 for alpha1). Leave empty to auto-increment or start at 1."
2626
type: string
2727
default: ""
28+
confirm_major:
29+
description: "Type RELEASE MAJOR to confirm a major release"
30+
required: false
31+
default: ""
2832

2933
permissions:
3034
contents: write
@@ -47,6 +51,14 @@ jobs:
4751
exit 1
4852
fi
4953
54+
- name: Confirm major release
55+
if: ${{ inputs.version == 'major' && inputs.dry_run == false }}
56+
run: |
57+
if [ "${{ inputs.confirm_major }}" != "RELEASE MAJOR" ]; then
58+
echo "❌ For major releases, set confirm_major to RELEASE MAJOR"
59+
exit 1
60+
fi
61+
5062
- name: Checkout repository
5163
uses: actions/checkout@v4
5264
with:

0 commit comments

Comments
 (0)