Skip to content

Commit 51ecef5

Browse files
authored
Add osx linux ci to nightly release (openframeworks#360)
1 parent bbee5bb commit 51ecef5

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

.github/workflows/build-macos.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,13 @@ jobs:
5050
GA_APPLE_USERNAME: ${{ secrets.GA_APPLE_USERNAME }}
5151
GA_APPLE_PASS: ${{ secrets.GA_APPLE_PASS }}
5252
GA_NOTARIZE_PROVIDER: ${{ secrets.GA_NOTARIZE_PROVIDER }}
53-
54-
53+
- name: Update Release
54+
if: github.repository == 'openframeworks/projectGenerator' && github.ref == 'refs/heads/master'
55+
uses: IsaacShelton/[email protected]
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
tag: nightly
59+
release: nightly
60+
prerelease: false
61+
replace: true
62+
files: projectGenerator-osx.zip projectGenerator-ios.zip

scripts/osx/buildPG.sh

+33-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,33 @@ echoDots(){
1717
done
1818
}
1919

20+
package_app(){
21+
if [[ "${GITHUB_REF##*/}" == "master" && -z "${GITHUB_HEAD_REF}" ]] ; then
22+
23+
PLATFORM=$1
24+
# Copy commandLine into electron .app
25+
cd ${pg_root}
26+
cp commandLine/bin/projectGenerator projectGenerator-$PLATFORM/projectGenerator.app/Contents/Resources/app/app/projectGenerator 2> /dev/null
27+
28+
sed -i -e "s/osx/$PLATFORM/g" projectGenerator-$PLATFORM/projectGenerator.app/Contents/Resources/app/settings.json
29+
30+
# Sign app
31+
echo "Signing electron .app"
32+
cd ${pg_root}
33+
xattr -cr projectGenerator-$PLATFORM/projectGenerator.app
34+
35+
electron-osx-sign projectGenerator-$PLATFORM/projectGenerator.app --platform=darwin --type=distribution --no-gatekeeper-assess --hardened-runtime --entitlements=scripts/osx/PG.entitlements --entitlements-inherit=scripts/osx/PG.entitlements
36+
37+
echo "Compressing PG app"
38+
zip --symlinks -r -q projectGenerator-$PLATFORM.zip projectGenerator-$PLATFORM
39+
40+
# need to upload zip of just app to apple for notarizing
41+
zip --symlinks -r -q projectGenerator-$PLATFORM/projectGenerator.app.zip projectGenerator-$PLATFORM/projectGenerator.app
42+
xcrun altool --notarize-app --primary-bundle-id "com.electron.projectgenerator" --username "${GA_APPLE_USERNAME}" -p "${GA_APPLE_PASS}" --asc-provider "${GA_NOTARIZE_PROVIDER}" --file projectGenerator-$PLATFORM/projectGenerator.app.zip
43+
44+
fi
45+
}
46+
2047

2148
sign_and_upload(){
2249
PLATFORM=$1
@@ -180,17 +207,17 @@ npm update
180207
npm install > /dev/null
181208
npm run build:osx > /dev/null
182209
mv dist/projectGenerator-darwin-x64 ${pg_root}/projectGenerator-osx
183-
sign_and_upload osx
210+
package_app osx
184211

185212
cd ${pg_root}/frontend
186213
npm run build:osx > /dev/null
187214
mv dist/projectGenerator-darwin-x64 ${pg_root}/projectGenerator-ios
188-
sign_and_upload ios
215+
package_app ios
189216

190-
cd ${pg_root}/frontend
191-
npm run build:osx > /dev/null
192-
mv dist/projectGenerator-darwin-x64 ${pg_root}/projectGenerator-android
193-
sign_and_upload android
217+
#cd ${pg_root}/frontend
218+
#npm run build:osx > /dev/null
219+
#mv dist/projectGenerator-darwin-x64 ${pg_root}/projectGenerator-android
220+
#package_app android
194221

195222
rm -rf scripts/id_rsa 2> /dev/null
196223
rm -rf scripts/*.p12 2> /dev/null

0 commit comments

Comments
 (0)