From abc60df75cf1ba557e1303f9318a61d859943768 Mon Sep 17 00:00:00 2001 From: cheng zhen Date: Sun, 29 Dec 2024 10:39:45 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- github/workflows/build.yml | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 github/workflows/build.yml diff --git a/github/workflows/build.yml b/github/workflows/build.yml new file mode 100644 index 0000000..ce7a206 --- /dev/null +++ b/github/workflows/build.yml @@ -0,0 +1,60 @@ +name: Build Executables + +on: + push: + branches: [ "main", "master" ] # 只在主分支推送时触发 + +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@v2 + with: + name: CursorPro-Windows + path: dist/CursorPro.exe + + build-macos: + 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 executable + run: | + pyinstaller CursorKeepAlive.spec + + - name: Upload MacOS artifact + uses: actions/upload-artifact@v2 + with: + name: CursorPro-MacOS + path: dist/CursorPro \ No newline at end of file