chore: run npx browserslist@latest --update-db
#40
Workflow file for this run
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: 'Build & Publish' | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
permissions: | |
contents: write | |
jobs: | |
test: | |
name: 'Test & Lint' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['20.x', '22.x', 'lts/*'] | |
concurrency: | |
group: test:${{ github.event_name }}:${{ github.ref }}:node-${{ matrix.node-version }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
# Test | |
- name: 🧪 Test | |
run: yarn test | |
# Lint | |
- name: 📐 Lint | |
run: yarn lint | |
build: | |
name: 'Build' | |
runs-on: ubuntu-latest | |
concurrency: | |
group: build:${{ github.event_name }}:${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: 📦 Build | |
run: yarn build | |
- name: ⬆️ Upload built library | |
uses: actions/upload-artifact@v4 # upload built files to be used in release job | |
with: | |
name: dist | |
path: dist | |
retention-days: 1 | |
release: | |
name: 'Release' | |
needs: [test, build] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
packages: write | |
concurrency: | |
group: release:${{ github.event_name }}:${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: ⬇️ Download built library | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist |