fix(ci): More validation of git tag #137
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CI: true | |
jobs: | |
########################################################################## | |
# Build | |
########################################################################## | |
build: | |
name: Build [Node.js ${{ matrix.node-version }}] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install | |
run: | | |
corepack enable | |
yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
########################################################################## | |
# Release precheck | |
########################################################################## | |
release_precheck: | |
name: 'Release (precheck)' | |
needs: build | |
if: | | |
github.ref == 'ref/head/main' && | |
github.event_name == 'push' && | |
contains(github.event.head_commit.message, 'chore(release)') | |
uses: ./.github/workflows/release.yml |