Skip to content

Commit

Permalink
chore: 增加 x86 版本测试
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng zhen committed Jan 4, 2025
1 parent 6bffc66 commit 4e9dc79
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Executables

on:
push:
branches:
- main
tags:
- 'v*' # 添加标签触发条件,匹配 v1.0.0 这样的标签

Expand Down Expand Up @@ -60,6 +62,35 @@ jobs:
name: CursorPro-MacOS-ARM64
path: dist/CursorPro

build-macos-x86:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build MacOS x86 executable
env:
ARCHFLAGS: "-arch x86_64"
run: |
pyinstaller CursorKeepAlive.spec
- name: Upload MacOS x86 artifact
uses: actions/upload-artifact@v4
with:
name: CursorPro-MacOS-x86
path: dist/CursorPro

build-linux:
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -88,7 +119,7 @@ jobs:
path: dist/CursorPro

create-release:
needs: [build-windows, build-macos-arm64, build-linux]
needs: [build-windows, build-macos-arm64, build-macos-x86, build-linux]
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')

Expand All @@ -103,6 +134,7 @@ jobs:
cd artifacts
zip -r CursorPro-Windows.zip CursorPro-Windows/
zip -r CursorPro-MacOS-ARM64.zip CursorPro-MacOS-ARM64/
zip -r CursorPro-MacOS-x86.zip CursorPro-MacOS-x86/
zip -r CursorPro-Linux.zip CursorPro-Linux/
- name: Create Release
Expand All @@ -111,6 +143,7 @@ jobs:
files: |
artifacts/CursorPro-Windows.zip
artifacts/CursorPro-MacOS-ARM64.zip
artifacts/CursorPro-MacOS-x86.zip
artifacts/CursorPro-Linux.zip
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

0 comments on commit 4e9dc79

Please sign in to comment.