build.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Build Executables
  2. on:
  3. push:
  4. branches: [ "main", "master" ] # 只在主分支推送时触发
  5. jobs:
  6. build-windows:
  7. runs-on: windows-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - name: Set up Python
  11. uses: actions/setup-python@v2
  12. with:
  13. python-version: '3.x'
  14. - name: Install dependencies
  15. run: |
  16. python -m pip install --upgrade pip
  17. pip install pyinstaller
  18. pip install -r requirements.txt
  19. - name: Build EXE
  20. run: |
  21. pyinstaller CursorKeepAlive.spec
  22. - name: Upload Windows artifact
  23. uses: actions/upload-artifact@v2
  24. with:
  25. name: CursorPro-Windows
  26. path: dist/CursorPro.exe
  27. build-macos:
  28. runs-on: macos-latest
  29. steps:
  30. - uses: actions/checkout@v2
  31. - name: Set up Python
  32. uses: actions/setup-python@v2
  33. with:
  34. python-version: '3.x'
  35. - name: Install dependencies
  36. run: |
  37. python -m pip install --upgrade pip
  38. pip install pyinstaller
  39. pip install -r requirements.txt
  40. - name: Build MacOS executable
  41. run: |
  42. pyinstaller CursorKeepAlive.spec
  43. - name: Upload MacOS artifact
  44. uses: actions/upload-artifact@v2
  45. with:
  46. name: CursorPro-MacOS
  47. path: dist/CursorPro