44 lines
929 B
YAML
44 lines
929 B
YAML
name: Publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish to npm
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version: 22
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
- name: Setup pnpm
|
|
run: |
|
|
corepack enable
|
|
corepack prepare pnpm@10.28.2 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Test
|
|
run: pnpm test
|
|
|
|
- name: Typecheck
|
|
run: pnpm typecheck
|
|
|
|
- name: Publish
|
|
run: npm publish --provenance
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|