From 192f857075e2d6656e2f54888dd0b47029afad02 Mon Sep 17 00:00:00 2001 From: Walid Kayhal <3347810+waliid@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:14:02 +0100 Subject: [PATCH] Add a step for the project configuration --- .github/workflows/pull-request.yml | 8 +++++++- Scripts/configure-environment.sh | 14 ++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5359a76e..a902da5d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -55,5 +55,11 @@ jobs: Scripts/add-apple-certificate.sh \ ${{ secrets.SRGSSR_APPLE_DEV_CERTIFICATE_B64 }} + - name: Configure environment + run: | + Scripts/configure-environment.sh \ + ${{ secrets.APP_STORE_CONNECT_API_KEY_B64 }} \ + ${{ secrets.APPLE_ACCOUNT_INFO_B64 }} + - name: Archive the demo - run: sleep 3600 #make archive-demo-${{ matrix.platform }} + run: make archive-demo-${{ matrix.platform }} diff --git a/Scripts/configure-environment.sh b/Scripts/configure-environment.sh index 9b2f06a5..167d164e 100755 --- a/Scripts/configure-environment.sh +++ b/Scripts/configure-environment.sh @@ -1,14 +1,16 @@ #!/bin/bash -apple_api_key_p8="$1" +set -x + +apple_api_key_b64="$1" apple_account_info_b64="$2" -if [[ -z $apple_api_key_p8 || -z $apple_account_info_b64 ]] +if [[ -z $apple_api_key_b64 || -z $apple_account_info_b64 ]] then - echo "[!] Usage: $0 " + echo "[!] Usage: $0 " exit 1 fi -mkdir -p ../Configuration -echo "$apple_account_info_b64" | base64 --decode > ../Configuration/.env -echo "$apple_api_key_p8" > ../Configuration/AppStoreConnect_API_Key.p8 +mkdir -p Configuration +echo "$apple_account_info_b64" | base64 --decode > Configuration/.env +echo "$apple_api_key_b64" | base64 --decode > Configuration/AppStoreConnect_API_Key.p8