This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
Update dependencies and Node versions #103
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: npmjs | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ '16', '18', '20' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ matrix.node }}-${{ hashFiles('**/package-lock.json', '**/.puppeteerrc.js') }} | |
- uses: volta-cli/action@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
npm-version: 6 | |
- if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- run: npm test | |
- if: github.event_name == 'release' && github.event.action == 'published' && matrix.node == '20' | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |