Skip to content

Publish to npm

Publish to npm #6

Workflow file for this run

name: Publish to npm
on:
workflow_dispatch:
inputs:
confirm:
description: "Figma plugin is published"
required: true
type: boolean
default: false
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ inputs.confirm }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: bun install
- name: Run build
run: bun run build
- name: Run tests
run: bun test
- name: Publish figdeck to npm
run: bun publish --access public
working-directory: packages/cli
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}