Skip to content

Commit

Permalink
chore: 测试workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng zhen committed Jan 10, 2025
1 parent 24c4492 commit 0aa03c5
Showing 1 changed file with 14 additions and 57 deletions.
71 changes: 14 additions & 57 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,9 @@ jobs:
with:
python-version: '3.x'

- name: Install dependencies
- name: Run build script
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build EXE
run: |
pyinstaller CursorKeepAlive.spec
- name: Copy and rename env file
run: |
copy .env.example dist\.env
.\build.bat
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
Expand All @@ -52,19 +42,10 @@ jobs:
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
- name: Run build script
run: |
pyinstaller CursorKeepAlive.spec
- name: Copy and rename env file
run: |
cp .env.example dist/.env
chmod +x ./build.mac.command
./build.mac.command
- name: Upload MacOS ARM artifact
uses: actions/upload-artifact@v4
Expand All @@ -85,19 +66,10 @@ jobs:
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: Copy and rename env file
- name: Run build script
run: |
cp .env.example dist/.env
chmod +x ./build.sh
./build.sh
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
Expand All @@ -109,35 +81,20 @@ jobs:
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: Copy and rename env file

- name: Run build script
run: |
cp .env.example dist/.env
chmod +x ./build.mac.command
arch -x86_64 ./build.mac.command
- name: Verify architecture
run: |
file dist/CursorPro | grep "x86_64" || (echo "Wrong architecture" && exit 1)
- name: Upload MacOS Intel artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 0aa03c5

Please sign in to comment.