-
Notifications
You must be signed in to change notification settings - Fork 8
140 lines (138 loc) · 5.61 KB
/
cross-build.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Cross-Platform Build
on: push
jobs:
pyinstaller-build-windows:
runs-on: windows-latest
steps:
- name: Build executable
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0
id: pyinstaller
with:
python_ver: '3.12'
spec: specs/maestro-windows.spec
requirements: requirements.txt
- name: Install NSIS
uses: repolevedavaj/install-nsis@v1.0.2
with:
nsis-version: 3.08
- name: Run NSIS
run: |
makensis install-scripts/windows.nsi
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: maestro-windows
path: install-scripts/maestro-installer.exe
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: maestro-windows-dist
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
pyinstaller-build-mac-x86:
runs-on: macos-12
steps:
- name: Build executable
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0
id: pyinstaller
with:
python_ver: '3.12'
spec: specs/maestro-mac-x86.spec
requirements: requirements.txt
- name: Read version from __version__.py
id: version
# read VERSION = "a.b.c" from __version__.py
run: |
VERSION=$(sed -n 's/VERSION = "\([^"]*\)"/\1/p' maestro/__version__.py)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Add install script
run: |
mkdir -p "${{ steps.pyinstaller.outputs.executable_path }}/Scripts"
mv install-scripts/mac "${{ steps.pyinstaller.outputs.executable_path }}/Scripts/postinstall"
- name: Create .pkg
id: pkgbuild
# main branch
# uses: PrajwalVandana/generate-mac-installer-github-action@fd5c2a03cfc2be65e32095573392ed03423a4208
# dev branch
uses: PrajwalVandana/generate-mac-installer-github-action@9d0c29930827283cce48688cb2154b47c92a4042
with:
root-directory: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
scripts-directory: "${{ steps.pyinstaller.outputs.executable_path }}/Scripts"
identifier: com.maestro.maestro-cli
version: ${{ steps.version.outputs.version }}
install-location: /usr/local/bin/maestro-bundle/
- name: Rename .pkg
run: |
mv "${{ steps.pkgbuild.outputs.output-path }}" "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg"
- name: Upload .pkg
uses: actions/upload-artifact@v4
with:
name: maestro-mac-intel
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg"
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: maestro-mac-intel-dist
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
pyinstaller-build-mac-arm:
runs-on: macos-latest
steps:
- name: Build executable
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0
id: pyinstaller
with:
python_ver: '3.12'
spec: specs/maestro-mac-arm.spec
requirements: requirements.txt
- name: Read version from __version__.py
id: version
# read VERSION = "a.b.c" from __version__.py
run: |
VERSION=$(sed -n 's/VERSION = "\([^"]*\)"/\1/p' maestro/__version__.py)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Add install script
run: |
mkdir -p "${{ steps.pyinstaller.outputs.executable_path }}/Scripts"
mv install-scripts/mac "${{ steps.pyinstaller.outputs.executable_path }}/Scripts/postinstall"
- name: Create .pkg
id: pkgbuild
# main branch
# uses: PrajwalVandana/generate-mac-installer-github-action@fd5c2a03cfc2be65e32095573392ed03423a4208
# dev branch
uses: PrajwalVandana/generate-mac-installer-github-action@9d0c29930827283cce48688cb2154b47c92a4042
with:
root-directory: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
scripts-directory: "${{ steps.pyinstaller.outputs.executable_path }}/Scripts"
identifier: com.maestro.maestro-cli
version: ${{ steps.version.outputs.version }}
install-location: /usr/local/bin/maestro-bundle/
- name: Rename .pkg
run: |
mv "${{ steps.pkgbuild.outputs.output-path }}" "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg"
- name: Upload .pkg
uses: actions/upload-artifact@v4
with:
name: maestro-mac-apple-silicon
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro-cli.pkg"
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: maestro-mac-apple-silicon-dist
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"
pyinstaller-build-linux:
runs-on: ubuntu-20.04
steps:
- name: Build executable
uses: PrajwalVandana/pyinstaller@c7c491de8409921df7045f681695d4d5ab71a4e0
id: pyinstaller
with:
python_ver: '3.12'
spec: specs/maestro-ubuntu.spec
requirements: requirements.txt
- name: Add install script
run: |
mv install-scripts/ubuntu "${{ steps.pyinstaller.outputs.executable_path }}/maestro/install-maestro"
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: maestro-ubuntu
path: "${{ steps.pyinstaller.outputs.executable_path }}/maestro"