-
Notifications
You must be signed in to change notification settings - Fork 0
feat(build-ui-android): multi-platform CI, UI refresh, and Android preview scaffolding #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,159 @@ | ||
| name: Build & Release | ||
| name: Multi-Platform Build & Release | ||
|
|
||
| on: | ||
| push: # ✅ 所有 push(所有分支、所有 tag)都会触发 | ||
| push: | ||
| branches: | ||
| - '**' | ||
| tags: | ||
| - '**' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
|
|
||
| permissions: | ||
| contents: write # 允许创建/更新 Release 和上传 Assets | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: windows-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: windows-latest | ||
| platform: windows | ||
| arch: x64 | ||
| - os: ubuntu-latest | ||
| platform: linux | ||
| arch: x64 | ||
| - os: macos-latest | ||
| platform: mac | ||
| arch: universal | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| name: Build ${{ matrix.platform }}-${{ matrix.arch }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "18" | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| - name: Build renderer & main | ||
| run: npm run build | ||
|
|
||
| - name: Package (exe) | ||
| - name: Package for ${{ matrix.platform }} | ||
| run: npm run package | ||
| env: | ||
| ELECTRON_BUILDER_ARCH: ${{ matrix.arch }} | ||
|
Comment on lines
+53
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The matrix arch values never reach electron-builder: lines 53‑56 run Useful? React with 👍 / 👎. |
||
|
|
||
| - name: Upload artifacts (Windows) | ||
| if: matrix.platform == 'windows' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: windows-${{ matrix.arch }} | ||
| path: | | ||
| release/*.exe | ||
| release/*.zip | ||
| retention-days: 7 | ||
| if-no-files-found: warn | ||
|
|
||
| - name: Upload artifacts (Linux) | ||
| if: matrix.platform == 'linux' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linux-${{ matrix.arch }} | ||
| path: | | ||
| release/*.AppImage | ||
| release/*.deb | ||
| retention-days: 7 | ||
| if-no-files-found: warn | ||
|
|
||
| # 可选:在 Actions 页面留一份 artifact | ||
| - name: Upload artifact | ||
| - name: Upload artifacts (macOS) | ||
| if: matrix.platform == 'mac' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: windows-build | ||
| path: release/*.exe | ||
| name: macos-${{ matrix.arch }} | ||
| path: | | ||
| release/*.dmg | ||
| release/*.zip | ||
| retention-days: 7 | ||
| if-no-files-found: warn | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'push' | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
|
|
||
| - name: Display structure | ||
| run: ls -R artifacts | ||
|
|
||
| # ✅ 每次 push 都创建一个 Release(自动生成唯一 tag) | ||
| - name: Create GitHub Release | ||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: release/*.exe | ||
| # 每次 run 生成一个唯一 tag:build-分支名-运行次数 | ||
| tag_name: build-${{ github.ref_name }}-${{ github.run_number }} | ||
| name: Build ${{ github.ref_name }} #${{ github.run_number }} | ||
| files: artifacts/**/* | ||
| tag_name: ${{ github.ref_type == 'tag' && github.ref_name || format('build-{0}-{1}', github.ref_name, github.run_number) }} | ||
| name: ${{ github.ref_type == 'tag' && format('Release {0}', github.ref_name) || format('Build {0} #{1}', github.ref_name, github.run_number) }} | ||
| body: | | ||
| Auto release from commit ${{ github.sha }} on branch "${{ github.ref_name }}". | ||
| 🚀 **Multi-Platform Release - OrangeTerm** | ||
|
|
||
| ## 支持平台 / Supported Platforms | ||
|
|
||
| | Platform | Architecture | Package Format | | ||
| |----------|-------------|---------------| | ||
| | 🪟 Windows | x64 | `.exe` (installer) + `.zip` (portable) | | ||
| | 🐧 Linux | x64 | `.AppImage` + `.deb` | | ||
| | 🍎 macOS | Universal (Intel + M1/M2) | `.dmg` + `.zip` | | ||
|
|
||
| --- | ||
|
|
||
| ## 📦 下载指南 / Download Guide | ||
|
|
||
| **Windows 用户:** | ||
| - 下载 `.exe` 文件获取安装程序 | ||
| - 或下载 `.zip` 文件获取便携版(无需安装) | ||
|
|
||
| **Linux 用户:** | ||
| - 推荐下载 `.AppImage` 文件(授予执行权限后直接运行) | ||
| - 或下载 `.deb` 文件进行系统级安装 | ||
|
|
||
| **macOS 用户:** | ||
| - 下载 `.dmg` 文件获取磁盘映像安装包 | ||
| - 或下载 `.zip` 文件解压后使用 | ||
|
|
||
| --- | ||
|
|
||
| ## 📝 更新日志 / Changelog | ||
|
|
||
| - ✨ 多平台自动构建支持 | ||
| - 🎨 UI 优化:更简约、更流畅的加载动效 | ||
| - 🚀 性能优化:提升启动速度和响应性能 | ||
| - 🔧 构建优化:支持多架构并行构建 | ||
|
|
||
| --- | ||
|
|
||
| **Commit:** `${{ github.sha }}` | ||
| **Branch:** `${{ github.ref_name }}` | ||
| **Build Time:** `${{ github.event.head_commit.timestamp }}` | ||
| draft: false | ||
| prerelease: ${{ github.ref_type != 'tag' }} | ||
| target_commitish: ${{ github.sha }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new workflow only defines a single Linux matrix entry with
arch: x64(lines 26‑28), butpackage.jsonnow declares Linux targets for both x64 and arm64 (lines 123‑127). With no arm64 job, the promised arm64.AppImage/.deboutputs are never produced or uploaded, leaving the new multi‑arch targets uncovered.Useful? React with 👍 / 👎.