Skip to content

Merge pull request #306 from MeasureAuthoringTool/MAT-10186 #187

Merge pull request #306 from MeasureAuthoringTool/MAT-10186

Merge pull request #306 from MeasureAuthoringTool/MAT-10186 #187

Workflow file for this run

name: npm-publish
on:
push:
branches:
- main
jobs:
npm-publish:
name: npm-publish
if: contains(github.event.pull_request.title || github.event.head_commit.message, 'Release')
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"
- name: Install node dependencies
run: npm ci
- name: Audit dependencies for security vulnerabilities
run: npm audit --omit=dev
- name: Build the source code
run: npm run build
- name: Publish to npm
run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}