Beta Release v1.0.0-beta Increment #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Beta Release v1.0.0-beta Increment | |
permissions: | |
contents: write | |
on: workflow_dispatch | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.TERRA_DRAW_PAT }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.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 | |
- name: Update Docs | |
run: npm run docs | |
- name: Run build | |
run: npm run build | |
- name: Set git credentials | |
run: | | |
git config --global user.email "terradraw@githubactions.com" | |
git config --global user.name "James Milner" | |
- name: Release | |
run: npm run release:beta:increment | |
- name: Check changelog is correct | |
run: npm run release:beta:changelog | |
- name: Push upstream | |
run: git push origin main | |
- name: Push tags upstream | |
run: git push origin main --tags | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |