Skip to content

Publish to npm

Publish to npm #2

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies and build
run: npm install
- name: Install Cosma
run: npm install . --global
# tests
- name: Build cosmoscopes
run: sh ./e2e/exec-modelize.sh
- name: Run unit tests
run: npm run test:unit -- --verbose
- name: Run E2E tests
run: npm run test:e2e
# publish
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --dry-run