v0.2.5 Maintenance Release #6
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: Prepare & Deploy a Release | |
on: | |
release: | |
types: [published] | |
env: | |
DEFAULT_NODE_VERSION: 14 | |
jobs: | |
release: | |
name: New Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node Environment | |
uses: actions/setup-node@v2 | |
# https://github.com/marketplace/actions/setup-node-js-environment | |
with: | |
node-version: ${{ env.DEFAULT_NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@ndigitals' | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: cache-nodemodules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ env.DEFAULT_NODE_VERSION }}-nodemodules-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }} | |
run: npm ci | |
- name: Publish NPM Release | |
run: npm publish --access public | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |