Skip to content

Merge pull request #22 from yushulx/dependabot/npm_and_yarn/examples/… #100

Merge pull request #22 from yushulx/dependabot/npm_and_yarn/examples/…

Merge pull request #22 from yushulx/dependabot/npm_and_yarn/examples/… #100

Workflow file for this run

name: Node.js Package
on: [push, pull_request]
jobs:
test:
name: Test example code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: test
run: |
npm i node-gyp -g
npm install
node-gyp configure
node-gyp build
node examples/command-line/test.js -f examples/command-line/test.tif
publish:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}