Skip to content

Bump the development-dependencies group across 1 directory with 2 upd… #49

Bump the development-dependencies group across 1 directory with 2 upd…

Bump the development-dependencies group across 1 directory with 2 upd… #49

# Melinda node tests
name: Melinda node tests and publish
on: push
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build-node-versions:
name: Node version matrix
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
env:
NPM_CONFIG_IGNORE_SCRIPTS: true
- run: npm update
- run: npm audit --package-lock-only --production --audit-level=high
- run: npm ci
- run: npm test
- run: npm run build --if-present
license-scan:
name: License compliance check
runs-on: ubuntu-latest
container: node:22
steps:
- uses: actions/checkout@v6
- uses: mikaelvesavuori/license-compliance-action@v1
with:
exclude_pattern: /^@natlibfi/
njsscan:
name: Njsscan check
runs-on: ubuntu-latest
container: node:22
steps:
- name: Checkout the code
uses: actions/checkout@v6
- name: nodejsscan scan
id: njsscan
uses: ajinabraham/njsscan-action@master
with:
args: '.'
publish:
runs-on: ubuntu-latest
container: node:22
needs: [build-node-versions, njsscan]
if: contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v6
# Setup .npmrc file to publish to npm
- name: Prepare node for publish
uses: actions/setup-node@v6
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm@latest
- name: Clean install
run: npm ci
# Publish stable release with --tag latest
- name: Publish stable release
if: ${{!contains(github.ref, '-alpha')}}
run: npm publish --tag=latest
# Publish pre-release without --tag latest
- name: Publish pre-release
if: contains(github.ref, '-alpha')
run: npm publish --tag=next