-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cheng zhen
committed
Feb 2, 2025
1 parent
2219e9c
commit 9dd0ddd
Showing
1 changed file
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: Build Executables | ||
|
||
on: | ||
workflow_dispatch: # 手动触发工作流 | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-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 EXE | ||
run: | | ||
pyinstaller CursorKeepAlive.spec | ||
- name: Upload Windows artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CursorPro-Windows | ||
path: dist/CursorPro.exe | ||
|
||
build-macos-arm64: | ||
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 ARM executable | ||
run: | | ||
pyinstaller CursorKeepAlive.spec | ||
- name: Upload MacOS ARM artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CursorPro-MacOS-ARM64 | ||
path: dist/CursorPro | ||
|
||
build-linux: | ||
runs-on: ubuntu-22.04 | ||
|
||
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 Linux executable | ||
run: | | ||
pyinstaller CursorKeepAlive.spec | ||
- name: Upload Linux artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CursorPro-Linux | ||
path: dist/CursorPro | ||
|
||
build-macos-intel: | ||
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: | | ||
arch -x86_64 pip3 install --upgrade pip | ||
arch -x86_64 pip3 install pyinstaller | ||
arch -x86_64 pip3 install -r requirements.txt | ||
- name: Build MacOS Intel executable | ||
env: | ||
TARGET_ARCH: 'x86_64' | ||
run: | | ||
arch -x86_64 python3 -m PyInstaller CursorKeepAlive.spec | ||
- name: Upload MacOS Intel artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CursorPro-MacOS-Intel | ||
path: dist/CursorPro |