Skip to content

Workflow file for this run

name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
if: env.PUBLISH_ENABLED == 'true'

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

View workflow run for this annotation

GitHub Actions / Publish Package to npmjs

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 9, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PUBLISH_ENABLED == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
- name: Configure npm authentication
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm ci
- name: Publish package
run: npm publish --provenance --access public