move signing mac apps to own script (#5999)

This commit is contained in:
tooomm 2025-06-22 22:21:33 +02:00 committed by ebbit1q
parent 0bbd4b6e58
commit 5f0cc94b29
3 changed files with 87 additions and 59 deletions

View file

@ -128,30 +128,13 @@ function ccachestatsverbose() {
}
# Compile
if [[ $RUNNER_OS == macOS ]]; then
echo "::group::Signing Certificate"
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]; then
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security default-keychain -s build.keychain
security set-keychain-settings -t 3600 -l build.keychain
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
echo "macOS signing certificate successfully imported and keychain configured."
else
echo "No signing certificate configured. Skipping set up of keychain in macOS environment."
fi
echo "::endgroup::"
fi
if [[ $USE_CCACHE ]]; then
echo "::group::Show ccache stats"
echo "::group::Show ccache stats (before)"
ccachestatsverbose
echo "::endgroup::"
fi
echo "::group::Configure cmake"
echo "::group::Configure CMake"
cmake --version
cmake .. "${flags[@]}"
echo "::endgroup::"
@ -167,7 +150,7 @@ fi
echo "::endgroup::"
if [[ $USE_CCACHE ]]; then
echo "::group::Show ccache stats again"
echo "::group::Show ccache stats (after)"
ccachestatsverbose
echo "::endgroup::"
fi