38
38
name : tests
39
39
path : ' **/*.ps-exe'
40
40
41
- macos-build-and-test :
41
+ macos-intel- build-and-test :
42
42
runs-on : macos-12
43
43
needs : build-openbios
44
44
steps :
@@ -66,19 +66,33 @@ jobs:
66
66
run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
67
67
- name : Injecting OpenBIOS
68
68
run : cp openbios.bin PCSX-Redux.app/Contents/Resources/share/pcsx-redux/resources
69
+ - name : Install node
70
+ uses : actions/setup-node@v4
71
+ with :
72
+ node-version : ' 22.6.0'
73
+ - name : Install jq
74
+ run : |
75
+ brew install jq
69
76
- name : Packaging
77
+ env :
78
+ APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_X64 }}
79
+ APPDISTRIB_ORGANIZATION : pcsx-redux
80
+ APPDISTRIB_PROJECT : dev-macos-x64
70
81
run : |
82
+ npx @appdistrib/cli buildid > buildid.json
71
83
echo '{' > version.json
72
84
echo ' "version": "'`git rev-parse HEAD | cut -c 1-8`'",' >> version.json
85
+ echo ' "buildId": '`jq -r .buildid buildid.json`',' >> version.json
73
86
echo ' "changeset": "'`git rev-parse HEAD`'",' >> version.json
74
87
echo ' "timestamp": '`date '+%s'`',' >> version.json
75
88
echo ' "channel": "dev",' >> version.json
76
89
echo ' "updateInfo": [' >> version.json
77
90
echo ' {' >> version.json
78
91
echo ' "channel": "dev",' >> version.json
79
- echo ' "method": "appcenter",' >> version.json
80
- echo ' "updateCatalog": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-macos/distribution_groups/public/public_releases",' >> version.json
81
- echo ' "updateInfoBase": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-macos/distribution_groups/public/releases/"' >> version.json
92
+ echo ' "method": "appdistrib",' >> version.json
93
+ echo ' "updateCatalog": "https://distrib.app/storage/manifests/pcsx-redux/dev-macos-x64/manifest.json",' >> version.json
94
+ echo ' "updateInfoBase": "https://distrib.app/storage/manifests/pcsx-redux/dev-macos-x64/",' >> version.json
95
+ echo ' "updateStorageUrl": "https://distrib.app/"' >> version.json
82
96
echo ' }' >> version.json
83
97
echo ' ]' >> version.json
84
98
echo '}' >> version.json
@@ -110,17 +124,17 @@ jobs:
110
124
- name : Upload DMG
111
125
uses : actions/upload-artifact@v4
112
126
with :
113
- name : Dmg
127
+ name : Dmg-intel
114
128
path : ' **/*.dmg'
115
129
- name : Upload version
116
130
uses : actions/upload-artifact@v4
117
131
with :
118
- name : Version
132
+ name : Version-intel
119
133
path : version.json
120
134
121
- publish-app :
135
+ publish-intel- app :
122
136
runs-on : ubuntu-latest
123
- needs : macos-build-and-test
137
+ needs : macos-intel- build-and-test
124
138
if : github.event_name == 'push'
125
139
steps :
126
140
- uses : actions/checkout@v1
@@ -130,17 +144,17 @@ jobs:
130
144
- name : Install node
131
145
uses : actions/setup-node@v4
132
146
with :
133
- node-version : ' latest '
147
+ node-version : ' 22.6.0 '
134
148
- name : Create BUILD environment
135
149
run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
136
150
- name : Download DMG
137
151
uses : actions/download-artifact@v4
138
152
with :
139
- name : Dmg
153
+ name : Dmg-intel
140
154
- name : Download version
141
155
uses : actions/download-artifact@v4
142
156
with :
143
- name : Version
157
+ name : Version-intel
144
158
- name : Distribute app
145
159
env :
146
160
APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_X64 }}
@@ -149,4 +163,129 @@ jobs:
149
163
APPCENTER_ACCESS_TOKEN : ${{ secrets.MACOS_APPCENTER_ACCESS_TOKEN }}
150
164
run : |
151
165
npx appcenter-cli distribute release -n 0 -b $BUILD -f PCSX-Redux-$BUILD-Intel.dmg -g 'Public' -a grumpycoders/pcsx-redux-macos --disable-telemetry
152
- npx @appdistrib/cli -m version.json upload PCSX-Redux-$BUILD-Intel.dmg
166
+ npx @appdistrib/cli -l buildId -m version.json upload PCSX-Redux-$BUILD-Intel.dmg
167
+
168
+ macos-arm-build-and-test :
169
+ runs-on : macos-14
170
+ needs : build-openbios
171
+ steps :
172
+ - uses : actions/checkout@v1
173
+ - uses : n1hility/cancel-previous-runs@v2
174
+ with :
175
+ token : ${{ secrets.GITHUB_TOKEN }}
176
+ - name : Install dependencies
177
+ run : ./.github/scripts/install-brew-dependencies.sh
178
+ - name : Fetch submodules
179
+ run : git submodule update --init --recursive
180
+ - name : Build PCSX-Redux
181
+ run : make -j 2 all pcsx-redux-tests
182
+ - name : Download OpenBIOS build
183
+ uses : actions/download-artifact@v4
184
+ with :
185
+ name : OpenBIOS
186
+ - name : Download mips tests
187
+ uses : actions/download-artifact@v4
188
+ with :
189
+ name : tests
190
+ - name : Bundle
191
+ run : ./.github/scripts/create-app.sh
192
+ - name : Create BUILD environment
193
+ run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
194
+ - name : Injecting OpenBIOS
195
+ run : cp openbios.bin PCSX-Redux.app/Contents/Resources/share/pcsx-redux/resources
196
+ - name : Install node
197
+ uses : actions/setup-node@v4
198
+ with :
199
+ node-version : ' 22.6.0'
200
+ - name : Install jq
201
+ run : |
202
+ brew install jq
203
+ - name : Packaging
204
+ env :
205
+ APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_ARM }}
206
+ APPDISTRIB_ORGANIZATION : pcsx-redux
207
+ APPDISTRIB_PROJECT : dev-macos-arm
208
+ run : |
209
+ npx @appdistrib/cli buildid > buildid.json
210
+ echo '{' > version.json
211
+ echo ' "version": "'`git rev-parse HEAD | cut -c 1-8`'",' >> version.json
212
+ echo ' "buildId": '`jq -r .buildid buildid.json`',' >> version.json
213
+ echo ' "changeset": "'`git rev-parse HEAD`'",' >> version.json
214
+ echo ' "timestamp": '`date '+%s'`',' >> version.json
215
+ echo ' "channel": "dev",' >> version.json
216
+ echo ' "updateInfo": [' >> version.json
217
+ echo ' {' >> version.json
218
+ echo ' "channel": "dev",' >> version.json
219
+ echo ' "method": "appdistrib",' >> version.json
220
+ echo ' "updateCatalog": "https://distrib.app/storage/manifests/pcsx-redux/dev-macos-arm/manifest.json",' >> version.json
221
+ echo ' "updateInfoBase": "https://distrib.app/storage/manifests/pcsx-redux/dev-macos-arm/",' >> version.json
222
+ echo ' "updateStorageUrl": "https://distrib.app/"' >> version.json
223
+ echo ' }' >> version.json
224
+ echo ' ]' >> version.json
225
+ echo '}' >> version.json
226
+ cp version.json PCSX-Redux.app/Contents/Resources/share/pcsx-redux/resources/version.json
227
+ - name : Signing Application
228
+ run : codesign --force -s - -vvvv PCSX-Redux.app
229
+ - name : Adjusting for dmg folder
230
+ run : |
231
+ mkdir dmgdir
232
+ mv PCSX-Redux.app dmgdir
233
+ cp dmgdir/PCSX-Redux.app/Contents/Resources/AppIcon.icns .
234
+ - name : Creating dmg icon
235
+ run : |
236
+ sips -i AppIcon.icns
237
+ DeRez -only icns AppIcon.icns > icns.rsrc
238
+ cp AppIcon.icns dmgdir/.VolumeIcon.icns
239
+ SetFile -c icnC dmgdir/.VolumeIcon.icns
240
+ SetFile -a C dmgdir
241
+ - name : Creating Application link
242
+ run : ln -s /Applications dmgdir
243
+ - name : Creating dmg file
244
+ run : hdiutil create -volname PCSX-Redux-$BUILD -srcfolder dmgdir -ov -format UDZO PCSX-Redux-$BUILD-Arm.dmg
245
+ - name : Applying icon to dmg file
246
+ run : |
247
+ Rez -append icns.rsrc -o PCSX-Redux-$BUILD-Arm.dmg
248
+ SetFile -a C PCSX-Redux-$BUILD-Arm.dmg
249
+ - name : Removing temporary dmg folder
250
+ run : rm -rf dmgdir
251
+ - name : Upload DMG
252
+ uses : actions/upload-artifact@v4
253
+ with :
254
+ name : Dmg-arm
255
+ path : ' **/*.dmg'
256
+ - name : Upload version
257
+ uses : actions/upload-artifact@v4
258
+ with :
259
+ name : Version-arm
260
+ path : version.json
261
+
262
+ publish-arm-app :
263
+ runs-on : ubuntu-latest
264
+ needs : macos-arm-build-and-test
265
+ if : github.event_name == 'push'
266
+ steps :
267
+ - uses : actions/checkout@v1
268
+ - uses : n1hility/cancel-previous-runs@v2
269
+ with :
270
+ token : ${{ secrets.GITHUB_TOKEN }}
271
+ - name : Install node
272
+ uses : actions/setup-node@v4
273
+ with :
274
+ node-version : ' 22.6.0'
275
+ - name : Create BUILD environment
276
+ run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
277
+ - name : Download DMG
278
+ uses : actions/download-artifact@v4
279
+ with :
280
+ name : Dmg-arm
281
+ - name : Download version
282
+ uses : actions/download-artifact@v4
283
+ with :
284
+ name : Version-arm
285
+ - name : Distribute app
286
+ env :
287
+ APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_ARM }}
288
+ APPDISTRIB_ORGANIZATION : pcsx-redux
289
+ APPDISTRIB_PROJECT : dev-macos-arm
290
+ run : |
291
+ npx @appdistrib/cli -l buildId -m version.json upload PCSX-Redux-$BUILD-Arm.dmg
0 commit comments