Automate npm publish #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple workflow for deploying static content to GitHub Pages | |
name: Publish NPM package | |
on: | |
# Runs on pushes targeting the deploy branch | |
push: | |
branches: ["publish"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install node modules | |
run: npm ci | |
- name: Build | |
env: | |
NODE_AUTH_TOKEN: "${{ secrets.NPM_PUBLISH_TOKEN }}" | |
run: make ci-publish |