Skip to content

Update actions/checkout action to v4 #312

Update actions/checkout action to v4

Update actions/checkout action to v4 #312

Workflow file for this run

name: CI
on:
push:
branches:
- master
- "v*"
tags:
- "v*"
pull_request:
jobs:
tests:
name: "Tests on Node.js ${{ matrix.node-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["12", "14"]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: yarn test --coverage
release:
name: Release
runs-on: ubuntu-latest
needs:
- tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
- name: auto-dist-tag
run: npx auto-dist-tag@1 --write
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}