Skip to content

Merge branch 'release/V5.42.0' #164

Merge branch 'release/V5.42.0'

Merge branch 'release/V5.42.0' #164

Workflow file for this run

name: Build and publish
on:
pull_request:
types:
- opened
push:
branches:
- develop
- development
- alpha
- beta
- master
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm test
- run: npm run build
- run: tar -czvf distrib-${{ matrix.node }}.tar.gz modbus examples extras package.json docs index.js README.md CHANGELOG.md
- uses: actions/upload-artifact@v4
with:
name: build-artifact-${{ matrix.node }}
path: distrib-${{ matrix.node }}.tar.gz
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}