Skip to content

ci(github): change node versions tested in matrix to try fix CI test … #33

ci(github): change node versions tested in matrix to try fix CI test …

ci(github): change node versions tested in matrix to try fix CI test … #33

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://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Node.js Package
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# release:
# types: [created]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18, 20 ]
name: Node ${{ matrix.node }} test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: pwd
- run: rm -rf ../../_temp/.npmrc
- run: npm run release