Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions .github/workflows/publish-knowledge.yml

This file was deleted.

17 changes: 12 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ name: Publish
on:
workflow_dispatch:
inputs:
package:
description: "Which package set to publish"
required: true
type: choice
options:
- bailian-cli
- knowledge-studio-cli
mode:
description: "Publish mode"
required: true
Expand All @@ -16,13 +23,13 @@ on:
type: string

concurrency:
group: publish-${{ inputs.mode }}-${{ inputs.channel }}
group: publish-${{ inputs.package }}-${{ inputs.mode }}-${{ inputs.channel }}
cancel-in-progress: false

jobs:
publish-stable:
if: inputs.mode == 'stable'
name: publish stable to npm + tag
name: publish stable (${{ inputs.package }}) to npm + tag
runs-on: ubuntu-latest
environment: production # Required Reviewers gate
permissions:
Expand Down Expand Up @@ -51,11 +58,11 @@ jobs:
- run: pnpm install --frozen-lockfile

- name: publish-stable
run: node tools/release/publish-stable.mjs
run: node tools/release/publish-stable.mjs ${{ inputs.package == 'knowledge-studio-cli' && '--knowledge' || '' }}

publish-channel:
if: inputs.mode == 'channel'
name: publish beta to npm
name: publish channel (${{ inputs.package }}) to npm
runs-on: ubuntu-latest
permissions:
contents: read # no tag, no Release; just publish
Expand Down Expand Up @@ -83,4 +90,4 @@ jobs:
- run: pnpm install --frozen-lockfile

- name: publish-channel
run: node tools/release/publish-channel.mjs --channel "${{ inputs.channel }}"
run: node tools/release/publish-channel.mjs ${{ inputs.package == 'knowledge-studio-cli' && '--knowledge' || '' }} --channel "${{ inputs.channel }}"
2 changes: 1 addition & 1 deletion tools/release/lib/packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const PACKAGES = [
];

// knowledge-studio-cli shares the same library deps as bailian-cli.
// Published via a separate workflow (publish-knowledge.yml) with --knowledge flag.
// Published via publish.yml with package=knowledge-studio-cli (passes --knowledge flag).
export const KSCLI_PACKAGE = { key: "kscli", dir: "packages/kscli", name: "knowledge-studio-cli" };
export const ALL_PACKAGES = [...PACKAGES, KSCLI_PACKAGE];

Expand Down
Loading