Skip to content

Commit

Permalink
chore: action publish on npm on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Myllaume committed Nov 5, 2024
1 parent 0aad207 commit f37186e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish to npm

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/

- 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 --provenance

0 comments on commit f37186e

Please sign in to comment.