mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-24 23:53:54 -07:00
CI: Move and clarify macOS signing certificate step (#5996)
* Update compile.sh * Update desktop-build.yml
This commit is contained in:
parent
90ce5f2c57
commit
f4569c513f
2 changed files with 19 additions and 13 deletions
|
|
@ -128,6 +128,23 @@ function ccachestatsverbose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compile
|
# 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
|
if [[ $USE_CCACHE ]]; then
|
||||||
echo "::group::Show ccache stats"
|
echo "::group::Show ccache stats"
|
||||||
ccachestatsverbose
|
ccachestatsverbose
|
||||||
|
|
|
||||||
15
.github/workflows/desktop-build.yml
vendored
15
.github/workflows/desktop-build.yml
vendored
|
|
@ -285,7 +285,7 @@ jobs:
|
||||||
key: ccache-${{matrix.os}}-${{matrix.type}}-${{env.BRANCH_NAME}}
|
key: ccache-${{matrix.os}}-${{matrix.type}}-${{env.BRANCH_NAME}}
|
||||||
restore-keys: ccache-${{matrix.os}}-${{matrix.type}}-
|
restore-keys: ccache-${{matrix.os}}-${{matrix.type}}-
|
||||||
|
|
||||||
- name: Build & Sign on Xcode ${{matrix.xcode}}
|
- name: Build on Xcode ${{matrix.xcode}}
|
||||||
shell: bash
|
shell: bash
|
||||||
id: build
|
id: build
|
||||||
env:
|
env:
|
||||||
|
|
@ -297,18 +297,7 @@ jobs:
|
||||||
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
|
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
|
||||||
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
|
||||||
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
||||||
run: |
|
run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE"
|
||||||
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
|
|
||||||
fi
|
|
||||||
.ci/compile.sh --server --test --ccache "$CCACHE_SIZE"
|
|
||||||
|
|
||||||
- name: Save compiler cache (ccache)
|
- name: Save compiler cache (ccache)
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue