mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-10 01:39:25 +00:00
ci: add pkg.pr.new previews (#95)
This commit is contained in:
parent
2e8c417818
commit
8b5065c08b
3 changed files with 60 additions and 0 deletions
50
.github/workflows/pkg-pr-new.yml
vendored
Normal file
50
.github/workflows/pkg-pr-new.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: pkg.pr.new
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish Kimi Code preview
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'MoonshotAI' && github.event.pull_request.draft == false
|
||||
|
||||
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: Build package dependencies
|
||||
run: pnpm run build:packages
|
||||
|
||||
- name: Generate Kimi Code built-in catalog
|
||||
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 Code package
|
||||
run: pnpm --filter @moonshot-ai/kimi-code run build
|
||||
|
||||
- name: Publish pkg.pr.new preview
|
||||
run: pnpm exec pkg-pr-new publish --bin --commentWithSha --packageManager=pnpm,npm --no-template './apps/kimi-code'
|
||||
Loading…
Add table
Add a link
Reference in a new issue