Skip to content

chore: 🤖 upgrade workflows #88

chore: 🤖 upgrade workflows

chore: 🤖 upgrade workflows #88

Workflow file for this run

name: publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
install:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20.x]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node_modules
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Install
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
publish:
runs-on: ubuntu-latest
needs: install
strategy:
matrix:
node: [20.x]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: Restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Cache package version
uses: actions/cache@v2
id: cache-package-version
with:
path: package.json
key: package-version-${{ hashFiles('**/package.json') }}
- name: Publish
if: steps.cache-package-version.outputs.cache-hit != 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}