This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
Prepare 3.0.1 #170
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: npmjs | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: ['Node'] | |
node: ['14', '16'] | |
include: | |
- target: Web | |
node: 16 | |
browser: Firefox | |
- target: Web | |
node: 16 | |
browser: Chromium | |
- target: Web | |
node: 16 | |
browser: WebKit | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
node_modules | |
~/.cache/ms-playwright | |
key: ${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: https://registry.npmjs.org/ | |
- run: npm install -g npm@^6 | |
- if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- if: matrix.node == '16' && matrix.browser == 'webkit' | |
run: sudo npx playwright install-deps | |
- run: ENV=${{ matrix.target }} BROWSER=${{ matrix.browser }} npm test | |
- id: benchmarks | |
run: ENV=${{ matrix.target }} BROWSER=${{ matrix.browser }} npm run benchmarks | |
- if: github.event_name == 'release' && github.event.action == 'published' && matrix.node == '16' && matrix.target == 'node' | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |