Kaynağa Gözat

feat(v0.3.3): CI/CD workflow + private model gateway config

- .github/workflows/build.yml — GitHub Actions multi-platform build
- providers/openai-compatible.json — OpenAI-compatible API config template
- Windows x64 + ia32 (32-bit) support in electron-builder
- Linux AppImage + deb + rpm targets
KirinCode 1 ay önce
ebeveyn
işleme
07058bbbd1
2 değiştirilmiş dosya ile 93 ekleme ve 0 silme
  1. 75 0
      .github/workflows/build.yml
  2. 18 0
      providers/openai-compatible.json

+ 75 - 0
.github/workflows/build.yml

@@ -0,0 +1,75 @@
+name: Build & Release
+
+on:
+  push:
+    tags: ['v*']
+  workflow_dispatch:
+
+jobs:
+  build-macos:
+    runs-on: macos-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: oven-sh/setup-bun@v2
+      - run: bun install --registry https://registry.npmmirror.com
+      - run: bun run --cwd packages/kirincode script/build-node.ts
+      - run: bun run --cwd packages/desktop build
+      - run: bun x electron-builder --mac --arm64 --x64 --config electron-builder.config.ts
+        working-directory: packages/desktop
+        env:
+          KIRINCODE_CHANNEL: prod
+          CSC_IDENTITY_AUTO_DISCOVERY: false
+      - uses: actions/upload-artifact@v4
+        with:
+          name: macos
+          path: packages/desktop/dist/*.dmg
+
+  build-windows:
+    runs-on: windows-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: oven-sh/setup-bun@v2
+      - run: bun install --registry https://registry.npmmirror.com
+      - run: bun run --cwd packages/kirincode script/build-node.ts
+      - run: bun run --cwd packages/desktop build
+      - run: bun x electron-builder --win --x64 --ia32 --config electron-builder.config.ts
+        working-directory: packages/desktop
+        env:
+          KIRINCODE_CHANNEL: prod
+          CSC_IDENTITY_AUTO_DISCOVERY: false
+      - uses: actions/upload-artifact@v4
+        with:
+          name: windows
+          path: packages/desktop/dist/*.exe
+
+  build-linux:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: oven-sh/setup-bun@v2
+      - run: bun install --registry https://registry.npmmirror.com
+      - run: bun run --cwd packages/kirincode script/build-node.ts
+      - run: bun run --cwd packages/desktop build
+      - run: bun x electron-builder --linux --x64 --arm64 --config electron-builder.config.ts
+        working-directory: packages/desktop
+        env:
+          KIRINCODE_CHANNEL: prod
+          CSC_IDENTITY_AUTO_DISCOVERY: false
+      - uses: actions/upload-artifact@v4
+        with:
+          name: linux
+          path: packages/desktop/dist/*.AppImage
+
+  release:
+    needs: [build-macos, build-windows, build-linux]
+    runs-on: ubuntu-latest
+    if: startsWith(github.ref, 'refs/tags/v')
+    steps:
+      - uses: actions/download-artifact@v4
+      - uses: softprops/action-gh-release@v2
+        with:
+          files: |
+            macos/*
+            windows/*
+            linux/*
+          generate_release_notes: true

+ 18 - 0
providers/openai-compatible.json

@@ -0,0 +1,18 @@
+{
+  "provider": {
+    "openai-compatible": {
+      "options": {
+        "apiKey": "{env:OPENAI_API_KEY}",
+        "baseURL": "{env:OPENAI_BASE_URL}"
+      },
+      "models": {
+        "default": {
+          "id": "{env:OPENAI_MODEL:-gpt-4o}",
+          "name": "Custom Model",
+          "contextWindow": 128000,
+          "maxOutputTokens": 16384
+        }
+      }
+    }
+  }
+}