3.0.3 #99
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
# .github/workflows/ci.yaml | |
# The stuff to run on every push to the repository. | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 8 | |
- name: Setup Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org/' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Test the library | |
run: pnpm test | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 8 | |
- name: Setup Node 20 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org/' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install && pnpm compile | |
- name: Publish package | |
run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} |