Skip to content

Merge pull request #278 from sCrypt-Inc/fix_dep #24

Merge pull request #278 from sCrypt-Inc/fix_dep

Merge pull request #278 from sCrypt-Inc/fix_dep #24

Workflow file for this run

on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
name: Publish to NPM
jobs:
build:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- name: Prepare git
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Npm install
run: npm i
- name: Download Compiler
run: npm run getBinary
- name: Run test
run: npm t
- name: clone boilerplate
run: git clone -b legacy https://github.com/scrypt-sv/boilerplate.git
- name: Test boilerplate
run: cd boilerplate && npm i ../ && npm t
- name: Verify Versions
run: node -e "if ('refs/tags/v' + require('./package.json').version !== '${{ github.ref }}') { console.log('::error' + 'Version Mismatch. refs/tags/v' + require('./package.json').version, '${{ github.ref }}'); throw Error('Version Mismatch')} "
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_SCRYPTLIB }}