diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9bd145dc3..3d2f7b002 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -39,6 +39,7 @@ jobs: uses: actions/checkout@v3 - name: Decide whether building nightly or release env: + PLATFORM: ${{ matrix.destination.platform }} UPLOAD_TO: ${{ matrix.destination.uploadto }} EXTRA_XCODEBUILD: ${{ matrix.destination.xcode_extra }} APPLE_STORE_AUTH_KEY_PATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }} @@ -60,7 +61,7 @@ jobs: export_method = "developer-id" if os.getenv("UPLOAD_TO") == "dmg" else "app-store" extra_xcode = os.getenv("EXTRA_XCODEBUILD", "") - if os.getenv("UPLOAD_TO"): + if os.getenv("PLATFORM") == "iOS": extra_xcode += f" -authenticationKeyPath {os.getenv('APPLE_STORE_AUTH_KEY_PATH')}" extra_xcode += f" -authenticationKeyID {os.getenv('APPLE_STORE_AUTH_KEY_ID')}" extra_xcode += f" -authenticationKeyIssuerID {os.getenv('APPLE_STORE_AUTH_KEY_ISSUER_ID')}" @@ -84,6 +85,18 @@ jobs: echo "SIGNING_CERTIFICATE_P12_PASSWORD=${APPLE_DEVELOPER_ID_SIGNING_P12_PASSWORD}" >> "$GITHUB_ENV" echo "SIGNING_IDENTITY=${APPLE_DEVELOPER_ID_SIGNING_IDENTITY}" >> "$GITHUB_ENV" + - name: Prepare use of Apple Development Certificate + if: ${{ matrix.destination.uploadto == 'ipa' }} + shell: bash + env: + APPLE_DEVELOPMENT_SIGNING_CERTIFICATE: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_CERTIFICATE }} + APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD }} + APPLE_DEVELOPMENT_SIGNING_IDENTITY: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_IDENTITY }} + run: | + echo "SIGNING_CERTIFICATE=${APPLE_DEVELOPMENT_SIGNING_CERTIFICATE}" >> "$GITHUB_ENV" + echo "SIGNING_CERTIFICATE_P12_PASSWORD=${APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD}" >> "$GITHUB_ENV" + echo "SIGNING_IDENTITY=${APPLE_DEVELOPMENT_SIGNING_IDENTITY}" >> "$GITHUB_ENV" + - name: Prepare use of Apple Distribution Certificate if: ${{ matrix.destination.uploadto == 'app-store' }} shell: bash