Skip to content

assert npm token

assert npm token #6

Workflow file for this run

name: Publish npm package
on:
push:
branches:
- master
- npm-package-deploy
jobs:
publish-github:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Publish package to GitHub Package Registry
run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} > .npmrc && npm publish --registry=https://npm.pkg.github.com
- name: Asserts NPM token to not be empty

Check failure on line 30 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
run: [ -z "${{ secrets.NPM_TOKEN }}" ] && { echo "token is not set"; exit 1; }
- name: Publish package to NPM
run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc && npm publish --registry=https://registry.npmjs.org