Skip to content

Publish

Publish #7

Workflow file for this run

name: Publish
on:
workflow_run:
workflows: ["Release"]
types: [completed]
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for npm provenance
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: '20'
check-latest: true
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run type check
run: npm run type-check
- name: Run lint
run: npm run lint:fix
- name: Format
run: npm run format
- name: Build package
run: npm run build:stdio
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}