Skip to content

Commit

Permalink
release: enforce no minor/major version jumps in hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
angusbayley committed Oct 31, 2024
1 parent ac14bf0 commit 5559f90
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release-prepare-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ jobs:
- name: install dependencies
run: pnpm i -F "ledger-live"

- name: Generate changeset status
run: pnpm changeset status --output=changeset-status.json

- name: Enforce use of patch level changesets only for hotfixes
run: |
MINOR_MAJOR_CHANGESET_IDS=$(jq -r '.changesets[] | select(.releases[].type == "minor" or .releases[].type == "major") | .id' changeset-status.json)
if [ -n "$MINOR_MAJOR_CHANGESET_IDS" ]; then
echo "Major/minor changesets found:"
echo "$MINOR_MAJOR_CHANGESET_IDS"
echo "❌ Hotfixes must use patch level changesets only"
exit 1
else
echo "✅ No major/minor level changesets found."
fi
- name: exit prerelease mode
run: pnpm changeset pre exit

Expand Down

0 comments on commit 5559f90

Please sign in to comment.