Skip to content

publish

publish #16

Workflow file for this run

name: publish
on:
workflow_dispatch:
jobs:
test:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: true
- name: Linting
run: pnpm eslint
- name: Type-checking
run: pnpm typecheck
- name: Tests
run: pnpm test
- name: Build
run: pnpm build
- name: Check for build artifacts
run: |
[ -f dist/cjs/index.js ] || (echo "CJS build missing" && exit 1)
[ -f dist/es/index.mjs ] || (echo "ESM build missing" && exit 1)
- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.CI_TOKEN }}
access: public
strategy: all
package: package.json