2024-06-21 17:57:55 +01:00
|
|
|
name: Publish to NPM
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2024-06-21 18:01:08 +01:00
|
|
|
runs-on: node
|
2024-06-21 17:57:55 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 20.x
|
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
|
- run: yarn build
|
|
|
|
- run: yarn test
|
|
|
|
- run: yarn lint
|
|
|
|
|
|
|
|
publish:
|
|
|
|
needs: build
|
2024-06-21 18:01:08 +01:00
|
|
|
runs-on: node
|
2024-06-21 17:57:55 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 20.x
|
|
|
|
- run: yarn install --frozen-lockfile
|
|
|
|
- run: yarn build
|
|
|
|
- uses: https://github.com/JS-DevTools/npm-publish@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.NPM_TOKEN }}
|