Skip to content

ci: allow tests to run on any branch #17

ci: allow tests to run on any branch

ci: allow tests to run on any branch #17

name: Handle Release Branch Push
on:
push:
jobs:
verify:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
script:
# - name: Typecheck
# command: test:types
- name: Lint
command: test:lint
- name: Unit tests
command: test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Rebuild binaries
run: npm rebuild
- name: ${{ matrix.script.name }}
run: npm run ${{ matrix.script.command }}
publish:
name: Publish release
needs:
- verify
if: contains(fromJson('["refs/heads/alpha", "refs/heads/beta", "refs/heads/main"]'), github.ref)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish Release
uses: ./.github/actions/publish-release
with:
branchName: ${{ github.head_ref || github.ref_name }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NPM_TOKEN }}