Skip to content

dedupe

dedupe #21

Workflow file for this run

name: Build
on: [push]
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 }}