Skip to content

v3.4.0

v3.4.0 #31

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
on:
release:
types: [created]
name: Publish to NPM
jobs:
deploy:
name: NPM Publish
runs-on: ubuntu-latest
environment: production
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
id: node-cache
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install Dependencies
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm install
- name: Prepublish
if: |
steps.npm-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm run prepublish:npm
- name: Publish to NPMJS
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm config set scope "@greatSumini"
npm config list
npm publish --access public
env:
CI: true
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}