Skip to content

Commit

Permalink
Revert "Try with original script, but apple payment removed for macOS…
Browse files Browse the repository at this point in the history
… FTP"

This reverts commit 3adb8bc.
  • Loading branch information
BPerlakiH committed Jan 9, 2025
1 parent 3adb8bc commit 4516435
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
push:

env:
KEYCHAIN: /Users/runner/build.keychain-db
KEYCHAIN: ""
KEYCHAIN_PASSWORD: mysecretpassword
KEYCHAIN_PROFILE: build-profile
SSH_KEY: /tmp/id_rsa
Expand Down Expand Up @@ -56,9 +56,8 @@ jobs:
- name: Install python dependencies
run: pip install pyyaml==6.0.1

- name: Remove Apple Pay capability for macOS FTP
if: matrix.platform == 'macOS' && matrix.destination == 'ftp'
run: sed -i '' '/in-app-payments/d' project.yml
- name: Set KEYCHAIN value
run: echo 'KEYCHAIN=/Users/runner/Library/Keychains/build-${{ matrix.platform }}-${{ matrix.destination}}.keychain-db' >> $GITHUB_ENV

- name: Set VERSION from code
shell: python
Expand Down Expand Up @@ -129,6 +128,7 @@ jobs:
if: matrix.platform == 'macOS' && matrix.destination == 'ftp' && contains(env.UPLOAD_TO, matrix.destination)
run: |
echo "EXPORT_METHOD=developer-id" >> $GITHUB_ENV
echo "EXTRA_XCODEBUILD=${{ env.APPLE_AUTH_PARAMS }}" >> $GITHUB_ENV
echo "SIGNING_CERTIFICATE=${{ secrets.APPLE_DEVELOPER_ID_SIGNING_CERTIFICATE }}" >> $GITHUB_ENV
echo "SIGNING_CERTIFICATE_P12_PASSWORD=${{ secrets.APPLE_DEVELOPER_ID_SIGNING_P12_PASSWORD }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -160,7 +160,6 @@ jobs:
DEPLOYMENT_SIGNING_CERTIFICATE_P12_PASSWORD: ${{ env.SIGNING_CERTIFICATE_P12_PASSWORD }}
KEYCHAIN: ${{ env.KEYCHAIN }}
KEYCHAIN_PASSWORD: ${{ env.KEYCHAIN_PASSWORD }}
KEYCHAIN_PROFILE: ${{ env.KEYCHAIN_PROFILE }}
EXTRA_XCODEBUILD: ${{ env.EXTRA_XCODEBUILD }}

- name: Add altool credentials to Keychain
Expand Down Expand Up @@ -201,15 +200,18 @@ jobs:
if: contains(env.UPLOAD_TO, matrix.destination)
env:
VERSION: ${{ env.VERSION }}
run: python .github/retry-if-retcode.py --sleep 60 --attempts 5 --retcode 70 xcrun xcodebuild -exportArchive -archivePath $PWD/Kiwix-$VERSION.xcarchive -exportPath $PWD/export/ -exportOptionsPlist export.plist
APPLE_AUTH_PARAMS: ${{ env.APPLE_AUTH_PARAMS }}
run: python .github/retry-if-retcode.py --sleep 60 --attempts 5 --retcode 70 xcrun xcodebuild -exportArchive -archivePath $PWD/Kiwix-$VERSION.xcarchive -exportPath $PWD/export/ -exportOptionsPlist export.plist -allowProvisioningUpdates $APPLE_AUTH_PARAMS

- name: Export notarized App from archive, Create and Notarize DMG
if: matrix.platform == 'macOS' && matrix.destination == 'ftp' && contains(env.UPLOAD_TO, matrix.destination)
env:
APPLE_AUTH_PARAMS: ${{ env.APPLE_AUTH_PARAMS }}
run: |
python .github/retry-if-retcode.py --sleep 60 --attempts 20 --retcode 65 xcrun xcodebuild -exportNotarizedApp -archivePath $PWD/Kiwix-$VERSION.xcarchive -exportPath $PWD/export/
python .github/retry-if-retcode.py --sleep 60 --attempts 20 --retcode 65 xcrun xcodebuild -exportNotarizedApp -archivePath $PWD/Kiwix-$VERSION.xcarchive -exportPath $PWD/export/ -allowProvisioningUpdates $APPLE_AUTH_PARAMS
pip install dmgbuild
dmgbuild -s .github/dmg-settings.py -Dapp=$PWD/export/Kiwix.app -Dbg=.github/dmg-bg.png "Kiwix-$VERSION" $PWD/kiwix-$VERSION.dmg
xcrun notarytool submit --keychain $KEYCHAIN --keychain-profile $KEYCHAIN_PROFILE --wait $PWD/kiwix-$VERSION.dmg
xcrun notarytool submit --keychain $KEYCHAIN --keychain-profile $KEYCHAIN_PROFILE --wait $PWD/kiwix-$VERSION.dmg $APPLE_AUTH_PARAMS
xcrun stapler staple $PWD/kiwix-$VERSION.dmg
- name: Add SSH_KEY to filesystem
Expand Down

0 comments on commit 4516435

Please sign in to comment.