build.mac.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Build Mac ARM Executable
  2. on:
  3. push:
  4. branches:
  5. - main
  6. tags:
  7. - 'v*'
  8. jobs:
  9. build-macos-arm64:
  10. runs-on: macos-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Set up Python
  14. uses: actions/setup-python@v2
  15. with:
  16. python-version: '3.x'
  17. - name: Install dependencies
  18. run: |
  19. python -m pip install --upgrade pip
  20. pip install pyinstaller
  21. pip install -r requirements.txt
  22. - name: Build MacOS ARM executable
  23. run: |
  24. pyinstaller CursorKeepAlive.spec
  25. - name: Copy and rename env file
  26. run: |
  27. cp .env.example dist/.env
  28. - name: Upload MacOS ARM artifact
  29. uses: actions/upload-artifact@v4
  30. with:
  31. name: CursorPro-MacOS-ARM64
  32. path: |
  33. dist/CursorPro
  34. dist/.env
  35. create-release:
  36. needs: [build-macos-arm64]
  37. runs-on: ubuntu-22.04
  38. if: startsWith(github.ref, 'refs/tags/')
  39. steps:
  40. - name: Download all artifacts
  41. uses: actions/download-artifact@v4
  42. with:
  43. path: artifacts
  44. - name: Create release archives
  45. run: |
  46. cd artifacts
  47. zip -r CursorPro-MacOS-ARM64.zip CursorPro-MacOS-ARM64/
  48. - name: Create Release
  49. uses: softprops/action-gh-release@v1
  50. with:
  51. files: |
  52. artifacts/CursorPro-MacOS-ARM64.zip
  53. env:
  54. GITHUB_TOKEN: ${{ secrets.TOKEN }}