File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,19 +46,16 @@ jobs:
4646 DEV_ID_INSTALLER : ${{ secrets.DEV_ID_INSTALLER }}
4747 DEV_ID_APPLICATION : ${{ secrets.DEV_ID_APPLICATION }}
4848 - run : .github/build.sh
49- if : ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'OpenSC/OpenSC' }}
5049 env :
5150 CODE_SIGN_IDENTITY : ${{ secrets.CODE_SIGN_IDENTITY }}
5251 DEVELOPMENT_TEAM : ${{ secrets.DEVELOPMENT_TEAM }}
5352 INSTALLER_SIGN_IDENTITY : ${{ secrets.INSTALLER_SIGN_IDENTITY }}
54- NOTARIZATION_PASSWORD : ${{ secrets.NOTARIZATION_PASSWORD }}
55- APPLE_ID : ${{ secrets.APPLE_ID }}
56- - run : .github/build.sh
57- if : ${{ ! startsWith(github.ref, 'refs/tags/') || github.repository != 'OpenSC/OpenSC' }}
53+ - run : MacOSX/notarize
54+ if : ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'OpenSC/OpenSC' }}
5855 env :
59- CODE_SIGN_IDENTITY : ${{ secrets.CODE_SIGN_IDENTITY }}
6056 DEVELOPMENT_TEAM : ${{ secrets.DEVELOPMENT_TEAM }}
61- INSTALLER_SIGN_IDENTITY : ${{ secrets.INSTALLER_SIGN_IDENTITY }}
57+ NOTARIZATION_PASSWORD : ${{ secrets.NOTARIZATION_PASSWORD }}
58+ APPLE_ID : ${{ secrets.APPLE_ID }}
6259 - run : .github/cleanup-macos.sh
6360 env :
6461 KEY_PASSWORD : ${{ secrets.DEV_ID_PASSWORD }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ EXTRA_DIST = build \
33 build-openssl-macos.sh \
44 Distribution.xml.in \
55 libtool-bundle \
6+ notarize \
67 OpenSC_applescripts.entitlements \
78 OpenSC_binaries.entitlements \
89 OpenSC_Notify.applescript \
Original file line number Diff line number Diff line change @@ -14,12 +14,14 @@ set -ex
1414test -x ./configure || ./bootstrap
1515BUILDPATH=${PWD}
1616
17+ # keep in sync with MacOSX/notarize
1718while IFS=' =' read -r key value; do
1819 # Skip empty or comment lines
1920 [[ -z " $key " || " $key " =~ ^# ]] && continue
2021 export " $key =$value "
2122done < $BUILDPATH /VERSION.mk
2223
24+ # keep in sync with MacOSX/notarize
2325export PACKAGE_VERSION= ${PACKAGE_VERSION_MAJOR} .${PACKAGE_VERSION_MINOR} .${PACKAGE_VERSION_FIX}
2426PREFIX= /Library/OpenSC
2527export PKG_CONFIG_PATH= $PKG_CONFIG_PATH :/usr/lib/pkgconfig
189191 fi
190192done
191193rm -r f ${imagedir}
192-
193- if test -n " ${NOTARIZATION_PASSWORD} " ; then
194- xcrun notarytool submit --team-id ${DEVELOPMENT_TEAM} --apple-id ${APPLE_ID} --password ${NOTARIZATION_PASSWORD} --wait OpenSC-${PACKAGE_VERSION} .dmg
195- xcrun stapler staple OpenSC-${PACKAGE_VERSION} .dmg
196- fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Notarize and staple the macOS installer image.
3+ #
4+ # This is only tested and supported on macOS 10.10 or later, using Xcode 6.0.1.
5+ # Building should also work on older macOS versions with slight changes; YMMV.
6+
7+ set -ex
8+ BUILDPATH=${PWD}
9+
10+ # keep in sync with MacOSX/build
11+ while IFS=' =' read -r key value; do
12+ # Skip empty or comment lines
13+ [[ -z " $key " || " $key " =~ ^# ]] && continue
14+ export " $key =$value "
15+ done < $BUILDPATH /VERSION.mk
16+
17+ # keep in sync with MacOSX/build
18+ export PACKAGE_VERSION= ${PACKAGE_VERSION_MAJOR} .${PACKAGE_VERSION_MINOR} .${PACKAGE_VERSION_FIX}
19+
20+ if test -n " ${NOTARIZATION_PASSWORD} " -a -n " ${DEVELOPMENT_TEAM} " ; then
21+ xcrun notarytool submit --team-id ${DEVELOPMENT_TEAM} --apple-id ${APPLE_ID} --password ${NOTARIZATION_PASSWORD} --wait OpenSC-${PACKAGE_VERSION} .dmg
22+ xcrun stapler staple OpenSC-${PACKAGE_VERSION} .dmg
23+ fi
You can’t perform that action at this time.
0 commit comments