1.0.13-test.2 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package to npmjs | |
on: | |
push: | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prepare git | |
run: git config --global core.autocrlf false | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16.x" | |
registry-url: "https://registry.npmjs.org" | |
- run: npm ci | |
- name: gen Env | |
run: echo "PRIVATE_KEY="${{ secrets.PRIVATE_KEY }}"" > ./tests/.env | |
- name: Test | |
run: 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')} " | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_SCRYPT_ORD }} |