Skip to content

.github/workflows/publish_npm_web.yaml #76

.github/workflows/publish_npm_web.yaml

.github/workflows/publish_npm_web.yaml #76

on:
release:
types:
- published
jobs:
publish:
if: startsWith(github.event.release.tag_name, '@getcanary/web_')
runs-on: ubuntu-latest
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: js/package-lock.json
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}