Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
push:
branches:
- main
- next
- next-major
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
# needs: [build, prettier]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Check branch
run: |
VALID_BRANCHES=("main" "next" "next-major" "beta" "alpha")
BRANCH_NAME=$(basename ${{ github.ref }})
if [[ ! " ${VALID_BRANCHES[@]} " =~ " ${BRANCH_NAME} " ]]; then
echo "Invalid branch name: $BRANCH_NAME"
echo "Valid branch names are: ${VALID_BRANCHES[@]}"
exit 1
fi
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
run: npx semantic-release