mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
ci: 👷 Add CI workflow to publish packages
This commit is contained in:
parent
e5e688a154
commit
77cd27a458
48
.github/workflows/publish.yml
vendored
Normal file
48
.github/workflows/publish.yml
vendored
Normal 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
|
||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -9,7 +9,8 @@
|
||||||
"plugin",
|
"plugin",
|
||||||
"worker",
|
"worker",
|
||||||
"media",
|
"media",
|
||||||
"client"
|
"packages/client",
|
||||||
|
"packages/sdk"
|
||||||
],
|
],
|
||||||
"languageToolLinter.languageTool.ignoredWordsInWorkspace": ["versia"]
|
"languageToolLinter.languageTool.ignoredWordsInWorkspace": ["versia"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue