Skip to content

Commit

Permalink
Add a step for the project configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid committed Nov 21, 2024
1 parent 460f852 commit 192f857
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
14 changes: 8 additions & 6 deletions Scripts/configure-environment.sh
Original file line number Diff line number Diff line change
@@ -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 <apple_api_key_p8> <apple_account_info_b64>"
echo "[!] Usage: $0 <apple_api_key_b64> <apple_account_info_b64>"
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

0 comments on commit 192f857

Please sign in to comment.