feat: configure semantic release to publish from alpha and beta branches #4
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: Semantic Release | |
on: | |
push: | |
branches: | |
- "main" | |
- "alpha" | |
- "beta" | |
jobs: | |
semantic-release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Ensure that the GH Actions default token isn't configured for git access, which intervenes with the semantic-release process. | |
persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 21 | |
- name: Install dependencies | |
run: npm i --non-interactive --pure-lockfile | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
GIT_AUTHOR_NAME: ${{ secrets.BOT_USERNAME }} | |
GIT_COMMITTER_NAME: ${{ secrets.BOT_USERNAME }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }} | |
run: npm run semantic-release -- --repository-url "$(git config --get remote.origin.url)" |