Skip to content

Commit

Permalink
[CI] macOS: prepare secret files
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator committed Feb 23, 2024
1 parent fa1580d commit ec570d4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Setup
run: |
ci/${{ matrix.platform }}/setup.sh
env:
MACOS_ASC_API_KEY: ${{ secrets.MACOS_ASC_API_KEY }}
MACOS_CODE_SIGN_KEY_BASE64: ${{ secrets.MACOS_CODE_SIGN_KEY_BASE64 }}
- name: Configure
run: |
cmake --preset ${{ matrix.preset || 'release' }}
Expand All @@ -31,11 +34,9 @@ jobs:
run: |
cpack --preset release
env:
ASC_API_KEY: ${{ secrets.MACOS_ASC_API_KEY }}
ASC_API_KEY_ID: ${{ secrets.MACOS_ASC_API_KEY_ID }}
ASC_API_KEY_ISSUER: ${{ secrets.MACOS_ASC_API_KEY_ISSUER }}
ASC_TEAM_ID: ${{ secrets.MACOS_ASC_TEAM_ID }}
CODE_SIGN_IDENTITY: ${{ secrets.MACOS_CODE_SIGN_IDENTITY }}
- name: Artifact
if: ${{ matrix.artifact }}
uses: actions/upload-artifact@v4
Expand Down
13 changes: 13 additions & 0 deletions ci/macos/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ for module in base tools ; do
7z x "$archive" '-xr!*.dSYM'
done
echo "CMAKE_PREFIX_PATH=$PWD/$(ls -1 | fgrep 6.)/macos" >> $GITHUB_ENV

if [ "$MACOS_ASC_API_KEY" ]; then
ascApiKey='ascApiKey.p8'
echo "$MACOS_ASC_API_KEY" > "$ascApiKey"
echo "ASC_API_KEY_PATH=$PWD/$ascApiKey" >> $GITHUB_ENV
fi

if [ "$MACOS_CODE_SIGN_KEY_BASE64" ]; then
codesignKey='codesign.p12'
echo "$MACOS_CODE_SIGN_KEY_BASE64" | base64 --decode > "$codesignKey"
security import "$codesignKey" -f pkcs12 -P "" -T "$(which codesign)"
echo "CODE_SIGN_IDENTITY=Developer ID Application: Kodi Foundation" >> $GITHUB_ENV
fi
2 changes: 1 addition & 1 deletion dmg_osx/notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
echo 'notarize dmg'
xcrun notarytool submit \
--verbose \
--key "$ASC_API_KEY" \
--key "$ASC_API_KEY_PATH" \
--key-id "$ASC_API_KEY_ID" \
--issuer "$ASC_API_KEY_ISSUER" \
--team-id "$ASC_TEAM_ID" \
Expand Down

0 comments on commit ec570d4

Please sign in to comment.