Update docs (#48) #130
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 | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn lint | |
- run: yarn prettier --check . | |
- run: yarn tsc --noEmit | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn playwright install chromium | |
- run: yarn test | |
- uses: actions/upload-artifact@v2 | |
if: ${{ always() }} | |
with: | |
name: test-artifacts | |
path: test-results | |
release: | |
runs-on: ubuntu-latest | |
needs: [lint, test] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- run: yarn install --immutable | |
- name: Create release pull request or publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |