|
@@ -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
|