-
-
Notifications
You must be signed in to change notification settings - Fork 25
185 lines (161 loc) · 5.65 KB
/
build.yaml
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Build
on:
push:
branches:
- main
- develop
workflow_dispatch:
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- project: osci-render
version: free
- project: osci-render
version: premium
- project: sosci
version: premium
steps:
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "[email protected]:"' >> ~/.gitconfig
shell: bash
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
submodules: true
- name: "Run script"
run: |
export OS="linux"
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh "${{ matrix.project }}" "${{ matrix.version }}"
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Binaries
path: bin
retention-days: 7
build-macos:
name: Build macOS
runs-on: macos-latest
strategy:
matrix:
include:
- project: osci-render
version: free
- project: osci-render
version: premium
- project: sosci
version: premium
steps:
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "[email protected]:"' >> ~/.gitconfig
shell: bash
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
submodules: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Import application certificates
uses: apple-actions/import-codesign-certs@v3
with:
keychain: oscirender
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
p12-file-base64: ${{ secrets.APPLE_APPLICATION_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_APPLICATION_CERTIFICATE_PASSWORD }}
- name: Import installer certificates
uses: apple-actions/import-codesign-certs@v3
with:
keychain: oscirender
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
p12-file-base64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE }}
p12-password: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
create-keychain: false
- name: "Run script"
run: |
export OS="mac"
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh "${{ matrix.project }}" "${{ matrix.version }}"
shell: bash
- name: Download Packages installer build tool
run: wget http://s.sudre.free.fr/files/Packages_1211_dev.dmg
- name: Mount Packages image
run: hdiutil attach Packages_1211_dev.dmg
- name: Install Packages
run: sudo installer -pkg /Volumes/Packages\ 1.2.11/Install\ Packages.pkg -target /
- name: Build installer
run: packagesbuild --project "packaging/${{ matrix.project }}.pkgproj"
- name: Sign installer
run: |
productsign -s "${{ secrets.APPLE_DEVELOPER_ID_INSTALLER }}" "packaging/build/${{ matrix.project }}.pkg" "bin/${{ matrix.project }}-${{ matrix.version }}.pkg"
pkgutil --check-signature "bin/${{ matrix.project }}-${{ matrix.version }}.pkg"
- name: Notarize installer
uses: lando/notarize-action@v2
with:
product-path: "bin/${{ matrix.project }}-${{ matrix.version }}.pkg"
appstore-connect-username: ${{ secrets.APPLE_ID }}
appstore-connect-password: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
appstore-connect-team-id: ${{ secrets.APPLE_TEAM_ID }}
primary-bundle-id: com.${{ matrix.project }}.pkg
tool: notarytool
verbose: true
- name: Staple installer
run: xcrun stapler staple "bin/${{ matrix.project }}-${{ matrix.version }}.pkg"
- name: Check installer
run: spctl -a -vvv -t install "bin/${{ matrix.project }}-${{ matrix.version }}.pkg"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Binaries
path: bin
retention-days: 7
build-windows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
include:
- project: osci-render
version: free
- project: osci-render
version: premium
- project: sosci
version: premium
steps:
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "[email protected]:"' >> ~/.gitconfig
shell: bash
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
submodules: true
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
- name: NuGet Sources
run: nuget sources
- name: "Run script"
run: |
export OS="win"
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh "${{ matrix.project }}" "${{ matrix.version }}"
shell: bash
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: "packaging/${{ matrix.project }}.iss"
- name: Move installer to bin
run: mv "packaging/build/${{ matrix.project }}.exe" "bin/${{ matrix.project }}-${{ matrix.version }}.exe"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Binaries
path: bin
retention-days: 7