Skip to content

Node.js Package with NPM #24

Node.js Package with NPM

Node.js Package with NPM #24

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:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm ci
- name: Mock testing
run: npm test
- name: E2E testing
run: npm test -i
env:
ONFIDO_API_TOKEN: ${{secrets.ONFIDO_API_TOKEN}}
ONFIDO_SAMPLE_APPLICANT_ID: ${{secrets.ONFIDO_SAMPLE_APPLICANT_ID}}
ONFIDO_SAMPLE_VIDEO_ID_1: ${{secrets.ONFIDO_SAMPLE_VIDEO_ID_1}}
ONFIDO_SAMPLE_VIDEO_ID_2: ${{secrets.ONFIDO_SAMPLE_VIDEO_ID_2}}
ONFIDO_SAMPLE_MOTION_ID_1: ${{secrets.ONFIDO_SAMPLE_MOTION_ID_1}}
ONFIDO_SAMPLE_MOTION_ID_2: ${{secrets.ONFIDO_SAMPLE_MOTION_ID_2}}
NOCK_OFF: true
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}