Skip to content

Commit

Permalink
Merge branch 'configs'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/release_sample_app.yml
  • Loading branch information
fdobjenschi committed Mar 5, 2024
2 parents 540e08d + 3259bc2 commit 81016f5
Show file tree
Hide file tree
Showing 26 changed files with 902 additions and 75 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/release_sample_app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release new Test App version
name: Release new Sample App version
run-name: 🚀 TestAPP ${{ github.actor }} started a new ${{inputs.version_bump_Type}} release in ${{inputs.channel_type}} channel

on:
Expand Down Expand Up @@ -38,10 +38,11 @@ jobs:
uses: actions/checkout@v3
with:
path: main
token: ${{ secrets.GIT_TOKEN}}

- name: Setup ENV VARS
run: |
echo "CI_MAIN_SDK_REPO_PATH=$GITHUB_WORKSPACE/main" >> $GITHUB_ENV
echo "CI_MAIN_REPO_PATH=$GITHUB_WORKSPACE/main" >> $GITHUB_ENV
- name: Install the Apple certificate and provisioning profile
env:
Expand Down Expand Up @@ -93,24 +94,48 @@ jobs:
shell: bash

- name: Sample App Release
env:
APP_CENTER_SECRET_ALPHA: ${{ secrets.APP_CENTER_SECRET_ALPHA }}
APP_CENTER_SECRET_BETA: ${{ secrets.APP_CENTER_SECRET_BETA }}
APP_CENTER_SECRET_PROD: ${{ secrets.APP_CENTER_SECRET_PROD }}
run: |
cd $(echo "${CI_MAIN_SDK_REPO_PATH}")
cd $(echo "${CI_MAIN_REPO_PATH}")
env="alpha"
target="Alpha"
apiToken=""
case ${{inputs.channel_type}} in
stable)
env="prod" ; target="Prod"
apiToken=$APP_CENTER_SECRET_PROD
;;
beta)
env="beta" ; target="Beta"
apiToken=$APP_CENTER_SECRET_BETA
;;
alpha)
env="alpha" ; target="Alpha"
apiToken=$APP_CENTER_SECRET_ALPHA
;;
*)
echo -n "Unknown release channel_type" ; exit 1
;;
esac
echo "ENV $alpha, Target $Alpha"
bundle exec fastlane ios SAMPLE_APP_CREATE_RELEASE target:$target bump_type:${{ inputs.version_bump_Type }} --env $env --verbose
echo "ENV $env, Target $target"
echo "ApiToken chars: ${#apiToken}"
appDelegatePath=${CI_MAIN_REPO_PATH}/DailymotionPlayerSample/AppDelegate.swift
infoPlistPath=${CI_MAIN_REPO_PATH}/DailymotionPlayerSample/Info.plist
sed -i '' -e "s/<<AppCenterSecret>>/${apiToken}/g" $appDelegatePath
echo "AppDelegate at path ${appDelegatePath} secret replaced"
sed -i '' -e "s/AppCenterSecretPLIST/appcenter-${apiToken}/g" $infoPlistPath
echo "Info.plist at path ${infoPlistPath} secret replaced"
echo "Start build"
bundle exec fastlane ios SAMPLE_APP_CREATE_RELEASE api_token:$apiToken target:$target bump_type:${{ inputs.version_bump_Type }} --env $env --verbose
echo "Build Finished"
echo "Removing secrets"
sed -i '' -e "s/${apiToken}/<<AppCenterSecret>>/g" $appDelegatePath
echo "AppDelegate secret replaced"
sed -i '' -e "s/appcenter-${apiToken}/AppCenterSecretPLIST/g" $infoPlistPath
echo "Info.plist secret replaced"
echo "Start Tag the version"
bundle exec fastlane ios TEST_APP_GIT_TAG target:$target --verbose
shell: bash
Loading

0 comments on commit 81016f5

Please sign in to comment.