ci: 👷 Add CI workflow to publish packages

This commit is contained in:
Jesse Wierzbinski 2025-05-26 09:08:14 +02:00
parent e5e688a154
commit 77cd27a458
No known key found for this signature in database
2 changed files with 50 additions and 1 deletions

48
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: Build & Publish Packages
on:
workflow_dispatch:
inputs:
package:
description: "Package to publish"
required: true
type: choice
options:
- client
- sdk
tag:
description: "NPM tag to use"
required: true
type: choice
default: nightly
options:
- latest
- nightly
permissions:
contents: read
# For provenance generation
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
environment: NPM Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install
run: bun install --frozen-lockfile
- name: Publish to NPM
working-directory: packages/${{ inputs.package }}
run: bun publish --provenance --tag ${{ inputs.tag }} --access public
env:
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to JSR
working-directory: packages/${{ inputs.package }}
run: bunx jsr publish --allow-slow-types --allow-dirty

View file

@ -9,7 +9,8 @@
"plugin", "plugin",
"worker", "worker",
"media", "media",
"client" "packages/client",
"packages/sdk"
], ],
"languageToolLinter.languageTool.ignoredWordsInWorkspace": ["versia"] "languageToolLinter.languageTool.ignoredWordsInWorkspace": ["versia"]
} }