Skip to content

Build and publish

Build and publish #16

name: Build and publish
on:
release:
types: [created]
workflow_dispatch:
jobs:
build_and_publish:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Publish
run: pnpm publish --no-git-checks --access="public"
env:
NODE_AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true