Skip to content

Publish to NPM

Publish to NPM #253

Workflow file for this run

name: "Publish to NPM"
on:
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v3
with:
path: ~/.cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/cypress.json') }}
restore-keys: |
${{ runner.os }}-cypress-
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
- run: npm ci
env:
CI: true
CYPRESS_CACHE_FOLDER: '~/.cypress'
- name: Publish to NPM registry
run: npm publish --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}