Skip to content

Update

Update #1

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: |
npm ci --ignore-scripts
- name: Test
run: npm test
- name: Build
run: npm run build
publish-npm:
needs: ['build-and-test']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: |
npm ci --ignore-scripts
npm run build
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --global user.name ${{ secrets.GIT_NAME }}
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}