Correctly specify react version and fix typescript overrides. #116
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 | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn lint | |
- run: yarn prettier --check . | |
- run: yarn tsc | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn test | |
release: | |
runs-on: ubuntu-latest | |
needs: [lint, test] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: yarn | |
- run: yarn install --immutable | |
- name: Create release pull request or publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: ./scripts/release.sh | |
version: ./scripts/version.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |