File tree Expand file tree Collapse file tree 3 files changed +22
-11
lines changed
Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -147,21 +147,29 @@ jobs:
147147 if : startsWith(runner.os, 'macOS')
148148 run : |
149149 # Load certificates
150- # TODO: Only load key & sign if env vars for signing exists
151- ./scripts/ci/import-macos-p12.sh
150+ # Only load key & sign if env vars for signing exists
151+ if [ -n "$APPLE_EMAIL" ]; then
152+ ./scripts/ci/import-macos-p12.sh
153+ fi
152154
153155 # Build .app and .dmg
154156 source venv/bin/activate
155157 make dist/ActivityWatch.dmg
156- codesign --verbose -s ${APPLE_PERSONALID} dist/ActivityWatch.dmg
157158
158- # Run prechecks
159- brew install akeru-inc/tap/xcnotary
160- xcnotary precheck dist/ActivityWatch.app
161- xcnotary precheck dist/ActivityWatch.dmg
159+ # codesign dmg
160+ if [ -n "$APPLE_EMAIL" ]; then
161+ codesign --verbose -s ${APPLE_PERSONALID} dist/ActivityWatch.dmg
162+ fi
163+
164+ if [ -n "$APPLE_EMAIL" ]; then
165+ # Run prechecks
166+ brew install akeru-inc/tap/xcnotary
167+ xcnotary precheck dist/ActivityWatch.app
168+ xcnotary precheck dist/ActivityWatch.dmg
162169
163- # Notarize
164- make dist/notarize
170+ # Notarize
171+ make dist/notarize
172+ fi
165173 mv dist/ActivityWatch.dmg dist/activitywatch-$(scripts/package/getversion.sh)-macos-x86_64.dmg
166174 env :
167175 APPLE_EMAIL : ${{ secrets.APPLE_EMAIL }}
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ current_release = subprocess.run(
1818print ("bundling activitywatch version " + current_release )
1919
2020entitlements_file = Path ("." ) / "scripts" / "package" / "entitlements.plist"
21- codesign_identity = os .environ .get ("APPLE_PERSONALID" )
22- if codesign_identity is None :
21+ codesign_identity = os .environ .get ("APPLE_PERSONALID" , "" ). strip ( )
22+ if not codesign_identity :
2323 print ("Environment variable APPLE_PERSONALID not set. Releases won't be signed." )
2424
2525aw_core_path = Path (os .path .dirname (aw_core .__file__ ))
Original file line number Diff line number Diff line change 11#! /bin/sh
2+
3+ set -e
4+
25# Source: https://www.update.rocks/blog/osx-signing-with-travis/
36export KEY_CHAIN=build.keychain
47export CERTIFICATE_P12=aw_certificate.p12
You can’t perform that action at this time.
0 commit comments