From 9dd0ddd645ef660ba3af92dd7a05b1be7084d930 Mon Sep 17 00:00:00 2001 From: cheng zhen Date: Sun, 2 Feb 2025 12:01:15 +0800 Subject: [PATCH] ci: Add temporary build workflow --- .github/workflows/temp-build.yml | 115 +++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .github/workflows/temp-build.yml diff --git a/.github/workflows/temp-build.yml b/.github/workflows/temp-build.yml new file mode 100644 index 0000000..8288d6a --- /dev/null +++ b/.github/workflows/temp-build.yml @@ -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 \ No newline at end of file