3838 name : tests
3939 path : ' **/*.ps-exe'
4040
41- macos-build-and-test :
41+ macos-intel- build-and-test :
4242 runs-on : macos-12
4343 needs : build-openbios
4444 steps :
@@ -66,19 +66,33 @@ jobs:
6666 run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
6767 - name : Injecting OpenBIOS
6868 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
6976 - name : Packaging
77+ env :
78+ APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_X64 }}
79+ APPDISTRIB_ORGANIZATION : pcsx-redux
80+ APPDISTRIB_PROJECT : dev-macos-x64
7081 run : |
82+ npx @appdistrib/cli buildid > buildid.json
7183 echo '{' > version.json
7284 echo ' "version": "'`git rev-parse HEAD | cut -c 1-8`'",' >> version.json
85+ echo ' "buildId": '`jq -r .buildid buildid.json`',' >> version.json
7386 echo ' "changeset": "'`git rev-parse HEAD`'",' >> version.json
7487 echo ' "timestamp": '`date '+%s'`',' >> version.json
7588 echo ' "channel": "dev",' >> version.json
7689 echo ' "updateInfo": [' >> version.json
7790 echo ' {' >> version.json
7891 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
8296 echo ' }' >> version.json
8397 echo ' ]' >> version.json
8498 echo '}' >> version.json
@@ -110,17 +124,17 @@ jobs:
110124 - name : Upload DMG
111125 uses : actions/upload-artifact@v4
112126 with :
113- name : Dmg
127+ name : Dmg-intel
114128 path : ' **/*.dmg'
115129 - name : Upload version
116130 uses : actions/upload-artifact@v4
117131 with :
118- name : Version
132+ name : Version-intel
119133 path : version.json
120134
121- publish-app :
135+ publish-intel- app :
122136 runs-on : ubuntu-latest
123- needs : macos-build-and-test
137+ needs : macos-intel- build-and-test
124138 if : github.event_name == 'push'
125139 steps :
126140 - uses : actions/checkout@v1
@@ -130,17 +144,17 @@ jobs:
130144 - name : Install node
131145 uses : actions/setup-node@v4
132146 with :
133- node-version : ' latest '
147+ node-version : ' 22.6.0 '
134148 - name : Create BUILD environment
135149 run : echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
136150 - name : Download DMG
137151 uses : actions/download-artifact@v4
138152 with :
139- name : Dmg
153+ name : Dmg-intel
140154 - name : Download version
141155 uses : actions/download-artifact@v4
142156 with :
143- name : Version
157+ name : Version-intel
144158 - name : Distribute app
145159 env :
146160 APPDISTRIB_TOKEN : ${{ secrets.APPDISTRIB_DEV_MACOS_X64 }}
@@ -149,4 +163,129 @@ jobs:
149163 APPCENTER_ACCESS_TOKEN : ${{ secrets.MACOS_APPCENTER_ACCESS_TOKEN }}
150164 run : |
151165 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