Skip to content

Set up GitHub Actions to publish to npm/crates.io (#119) #1

Set up GitHub Actions to publish to npm/crates.io (#119)

Set up GitHub Actions to publish to npm/crates.io (#119) #1

Workflow file for this run

on:
push:
branches:
- master
paths:
- 'JavaScript/package.json' # The version number must be bumped in order to publish to npm
workflow_dispatch:
name: Publish to npm
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
run: cd JavaScript && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}