Skip to content

Publish to NPM

Publish to NPM #3

Workflow file for this run

name: Publish to NPM
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
tests-workflow:
uses: ./.github/workflows/tests.yml

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

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

error parsing called workflow ".github/workflows/publish.yml" -> "./.github/workflows/tests.yml" (source branch with sha:b7d6d29104f30caf7934b30c705b733918a71d0f) : workflow is not reusable as it is missing a `on.workflow_call` trigger
publish:
needs: [tests-workflow]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
- name: Build
run: pnpm build
- name: Pack
run: rm -f *.tgz && npm pack
- name: Publish
run: npm publish *.tgz --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}