Skip to content

Commit d803928

Browse files
committed
CI mac: mv ensure step to environment.sh
handled earlier and not complicating the YAML
1 parent 953ef43 commit d803928

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/scripts/environment.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,17 @@ set_ximea_url() {
164164
}
165165
set_ximea_url
166166

167-
import_signing_key() {
168-
if [ "$(uname -s)" != Darwin ] || [ -z "$apple_key_p12_b64" ]; then
167+
import_macos_signing_key() {
168+
if [ "$(uname -s)" != Darwin ]; then
169+
return 0
170+
fi
171+
172+
if [ -z "$apple_key_p12_b64" ]; then
173+
if [ "${GITHUB_REPOSITORY?}" = CESNET/UltraGrid ]; then
174+
echo "apple_key_p12_b64 GitHub secret must be set"\
175+
"in main repository (signing won't work without)"
176+
exit 1
177+
fi
169178
return 0
170179
fi
171180
# Inspired by https://www.update.rocks/blog/osx-signing-with-travis/
@@ -182,7 +191,7 @@ import_signing_key() {
182191
printf '%b' "KEY_CHAIN_PASS=$KEY_CHAIN_PASS\nKEY_CHAIN=$KEY_CHAIN\n" \
183192
>> "$GITHUB_ENV"
184193
}
185-
import_signing_key
194+
import_macos_signing_key
186195

187196
printf '%b' 'DELTA_MAC_ARCHIVE=videomaster-macos-dev.tar.gz\n' >> "$GITHUB_ENV"
188197

.github/workflows/macos.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ jobs:
9292
- name: sign+notarize
9393
if: env.KEY_CHAIN != null
9494
run: .github/scripts/macOS/sign.sh uv-qt.app
95-
- name: ensure sign+notarize in main repo
96-
if: env.KEY_CHAIN == null && github.repository == 'CESNET/UltraGrid'
97-
&& github.ref == 'refs/heads/master'
98-
run: "echo 'UltraGrid must be signed but key (set by environment.sh)\
99-
is missing && exit 1"
10095
- name: make dmg
10196
run: |
10297
for n in `seq 5`; do # do more attempts

0 commit comments

Comments
 (0)