Skip to content

Merge branch 'release/v3.3.0-js' into main #15

Merge branch 'release/v3.3.0-js' into main

Merge branch 'release/v3.3.0-js' into main #15

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
workflow_dispatch:
push:
branches: main
paths: javascript/**
pull_request:
branches: main
paths: javascript/**
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
path: [./javascript/]
steps:
- name: Checkout of the repository
uses: actions/checkout@v3
- name: Configuration of the Node v${{matrix.node-version}} setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node-version}}
- name: Installation of the dependencies (for NPM)
run: npm --prefix ${{matrix.path}} ci
- name: Running the tests
run: npm --prefix ${{matrix.path}} test
publish-npm:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
path: [./javascript/]
steps:
- name: Checkout of the repository
uses: actions/checkout@v3
- name: Configuration of the Node v${{matrix.node-version}} setup
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node-version}}
registry-url: https://registry.npmjs.org/
- name: Installation of the dependencies (for NPM)
run: npm --prefix ${{matrix.path}} ci
- name: Publishing to NPM
run: npm --prefix ${{matrix.path}} run publish-to-npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}