Skip to content

Publish npm package

Publish npm package #9

Workflow file for this run

name: Publish npm package
on:
push:
tags:
- '*'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Install libgpiod
run: |
sudo apt-get install gpiod libgpiod2 libgpiod-dev libnode-dev -y
- name: Checkout
uses: actions/checkout@v3
- name: Configure Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish tag on npm
run: |
npm ci
npm run build
npm run test:coverage
npm publish