mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-23 15:46:26 +00:00
* chore(web): remove apps/kimi-web in favor of the code-app web bundle The web UI source now lives in the code-app repo (apps/web); this repo only ships the prebuilt bundle at apps/kimi-code/dist-web, synced from code-app via \. - delete apps/kimi-web (source, tests, docs) - root package.json: drop dev:web and the kimi-web typecheck leg - apps/kimi-code: drop the workspace dep and the build-from-source step; replace copy-web-assets.mjs with check-web-assets.mjs so packaging fails fast when the committed bundle is missing - CI: _native-build verifies the committed bundle instead of building from source; ci.yml and pkg-pr-new.yml drop the kimi-web legs - docs: AGENTS.md project map, changeset README, gen-changesets and sync-changelog skills now key web UI entries on dist-web * chore(web): stop ignoring dist-web now that the bundle is committed The ignore entry predates the code-app sync flow, when dist-web was a local build artifact. The bundle is now the canonical, committed form of the web UI, so ignoring it only forces every sync to git add -f. * docs(skills): drop the web-specific changeset and changelog rules The web: prefix convention and the web-specific dedup guidance belonged to the in-repo web app. With the source moved to code-app, web UI changes follow the same generic rules as any other CLI-bundle change. * chore(web): add changesets for the web UI changes in the bundle * chore(web): collapse the bundle changesets into one umbrella entry * ci: unbreak nix and lint after the kimi-web removal - flake.nix: drop apps/kimi-web from the source fileset and package lists, and verify the committed dist-web in the native build phase instead of building the web app from source - .oxlintrc.json: exclude dist-web (a committed build artifact) now that .gitignore no longer hides it from the linter * ci(nix): update pnpmDeps hash for the post-kimi-web lockfile * chore(web): resync dist-web from code-app main Bundle rebuilt from code-app main (upstream parity ports #175, pinned sidebar #176) with the CLI version 0.32.0 embedded.
128 lines
4.3 KiB
YAML
128 lines
4.3 KiB
YAML
name: _native-build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
upload-artifact-prefix:
|
|
description: 'Prefix for uploaded artifact name'
|
|
required: false
|
|
type: string
|
|
default: 'kimi-code-native'
|
|
retention-days:
|
|
description: 'Artifact retention in days'
|
|
required: false
|
|
type: number
|
|
default: 3
|
|
sign-macos:
|
|
description: 'Whether to sign + notarize macOS builds (requires Apple secrets)'
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
secrets:
|
|
APPLE_CERTIFICATE_P12:
|
|
required: false
|
|
APPLE_CERTIFICATE_PASSWORD:
|
|
required: false
|
|
APPLE_NOTARIZATION_KEY_P8:
|
|
required: false
|
|
APPLE_NOTARIZATION_KEY_ID:
|
|
required: false
|
|
APPLE_NOTARIZATION_ISSUER_ID:
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
native-bundle:
|
|
name: Native bundle (${{ matrix.target }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-24.04
|
|
target: linux-x64
|
|
- os: ubuntu-24.04-arm
|
|
target: linux-arm64
|
|
- os: macos-15-intel
|
|
target: darwin-x64
|
|
- os: macos-15
|
|
target: darwin-arm64
|
|
- os: windows-2025-vs2026
|
|
target: win32-x64
|
|
- os: windows-11-arm
|
|
target: win32-arm64
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Setup macOS keychain (release only)
|
|
if: runner.os == 'macOS' && inputs.sign-macos
|
|
uses: ./.github/actions/macos-keychain-setup
|
|
with:
|
|
certificate-p12: ${{ secrets.APPLE_CERTIFICATE_P12 }}
|
|
certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
|
|
- name: Generate built-in catalog (release artifacts)
|
|
if: inputs.sign-macos
|
|
shell: bash
|
|
run: |
|
|
CATALOG_FILE="$RUNNER_TEMP/kimi-code-built-in-catalog.json"
|
|
node apps/kimi-code/scripts/update-catalog.mjs --out "$CATALOG_FILE"
|
|
echo "KIMI_CODE_BUILT_IN_CATALOG_FILE=$CATALOG_FILE" >> "$GITHUB_ENV"
|
|
|
|
- name: Build Kimi web assets
|
|
# The SEA blob step embeds apps/kimi-code/dist-web. The bundle is
|
|
# committed (synced from the code-app repo) — just verify it is in place.
|
|
run: node apps/kimi-code/scripts/check-web-assets.mjs
|
|
|
|
- name: Build native executable (release profile, macOS signed)
|
|
if: runner.os == 'macOS' && inputs.sign-macos
|
|
run: pnpm --filter @moonshot-ai/kimi-code run build:native:release
|
|
|
|
- name: Build native executable (local profile)
|
|
if: '!(runner.os == ''macOS'' && inputs.sign-macos)'
|
|
run: pnpm --filter @moonshot-ai/kimi-code run build:native:sea
|
|
|
|
- name: Notarize macOS binary
|
|
if: runner.os == 'macOS' && inputs.sign-macos
|
|
uses: ./.github/actions/macos-notarize
|
|
with:
|
|
binary-path: ${{ github.workspace }}/apps/kimi-code/dist-native/bin/${{ matrix.target }}/kimi
|
|
notarization-key-p8: ${{ secrets.APPLE_NOTARIZATION_KEY_P8 }}
|
|
notarization-key-id: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
|
|
notarization-issuer-id: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
|
|
|
|
- name: Cleanup macOS keychain
|
|
if: always() && runner.os == 'macOS' && inputs.sign-macos
|
|
uses: ./.github/actions/macos-keychain-cleanup
|
|
|
|
- name: Smoke test native executable
|
|
run: pnpm --filter @moonshot-ai/kimi-code run test:native:smoke
|
|
|
|
- name: Package native artifact
|
|
run: pnpm --filter @moonshot-ai/kimi-code run package:native
|
|
|
|
- name: Upload native artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ${{ inputs.upload-artifact-prefix }}-${{ matrix.target }}
|
|
retention-days: ${{ inputs.retention-days }}
|
|
path: |
|
|
apps/kimi-code/dist-native/artifacts/kimi-code-${{ matrix.target }}.zip
|
|
apps/kimi-code/dist-native/artifacts/kimi-code-${{ matrix.target }}.zip.sha256
|
|
if-no-files-found: ignore
|