-
Notifications
You must be signed in to change notification settings - Fork 467
71 lines (57 loc) · 1.65 KB
/
build.mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build Mac ARM Executable
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
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: Copy and rename env file
run: |
cp .env.example dist/.env
ls -la dist/.env || (echo "ENV file not found!" && exit 1)
cat dist/.env | head -n 1 || (echo "Cannot read ENV file!" && exit 1)
- name: List dist directory contents
run: ls -la dist/
- name: Upload MacOS ARM artifact
uses: actions/upload-artifact@v4
with:
name: CursorPro-MacOS-ARM64
path: |
dist/*
create-release:
needs: [build-macos-arm64]
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create release archives
run: |
cd artifacts
zip -r CursorPro-MacOS-ARM64.zip CursorPro-MacOS-ARM64/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/CursorPro-MacOS-ARM64.zip
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}