summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorOwen Rudge <owen@owenrudge.net>2021-01-12 21:47:08 +0000
committerOwen Rudge <owen@owenrudge.net>2021-01-13 13:45:52 +0000
commit60851ef1a69a22b5efc43223363d3a4f62b1167e (patch)
tree68d918c9fc3b4969ab061b5b1eec2370e46edd76 /.github
parentc6fd6cfd1580f0f743ddb91a0d161758e3f8c7ac (diff)
downloadopenttd-60851ef1a69a22b5efc43223363d3a4f62b1167e.tar.xz
Feature: Sign macOS builds
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml30
1 files changed, 27 insertions, 3 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index efd58bfbd..d1eb1b525 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -420,6 +420,16 @@ jobs:
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
+ - name: Import code signing certificates
+ uses: Apple-Actions/import-codesign-certs@v1
+ with:
+ # The certificates in a PKCS12 file encoded as a base64 string
+ p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
+ # The password used to import the PKCS12 file.
+ p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
+ # If this is run on a fork, there may not be a certificate set up - continue in this case
+ continue-on-error: true
+
- name: Build
run: |
mkdir build
@@ -432,6 +442,8 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
+ "-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \
# EOF
echo "::endgroup::"
@@ -440,9 +452,21 @@ jobs:
make -j$(sysctl -n hw.logicalcpu) package
echo "::endgroup::"
- # Remove the sha256 files CPack generates; we will do this ourself at
- # the end of this workflow.
- rm -f bundles/*.sha256
+ - name: Install gon
+ env:
+ HOMEBREW_NO_AUTO_UPDATE: 1
+ HOMEBREW_NO_INSTALL_CLEANUP: 1
+ run: |
+ brew tap mitchellh/gon
+ brew install mitchellh/gon/gon
+
+ - name: Notarize
+ env:
+ AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_APP_USERNAME }}
+ AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_APP_PASSWORD }}
+ run: |
+ cd build
+ ../os/macosx/notarize.sh
- name: Store bundles
uses: actions/upload-artifact@v2