Fix CJS interop #26
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, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mskelton/setup-yarn@v1 | |
- run: yarn lint | |
- run: yarn prettier --check . | |
ts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mskelton/setup-yarn@v1 | |
- run: yarn ts | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: mskelton/setup-yarn@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Playwright | |
run: yarn playwright install chromium --with-deps | |
- run: yarn test | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-results | |
path: test-results | |
release: | |
needs: [lint, ts, test] | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- uses: actions/checkout@v2 | |
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 | |
uses: changesets/action@v1 | |
with: | |
publish: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |