Skip to content

Commit

Permalink
chore: add assurances to release script to prevent invalid changelog (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesLMilner committed Dec 30, 2023
1 parent 0a25d0e commit df04e5a
Show file tree
Hide file tree
Showing 5 changed files with 741 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Get previous commit
run: echo "LAST_COMMIT=$(echo $(git log -n 1))" >> $GITHUB_ENV

- name: Check previous commit is not a release
run: if [[ $LAST_COMMIT = *"chore(release):"* ]]; then echo "Last commit was a release!" && exit 1; fi

- name: Install
run: npm ci

Expand All @@ -40,6 +46,9 @@ jobs:
- name: Release
run: npm run release -- --prerelease --release-as $(echo ${{ env.NEXT }})

- name: Check changelog is correct
run: npm run release:alpha:changelog

- name: Push upstream
run: git push origin main --tags

Expand Down
Loading

0 comments on commit df04e5a

Please sign in to comment.