[ABW-3433] Fix Manifest Crash (#1177) #1151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
workflow_dispatch: | |
inputs: | |
flavour: | |
type: choice | |
description: App flavour | |
options: | |
- pre-alpha | |
- alpha | |
- beta | |
- release | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.inputs.flavour }} | |
cancel-in-progress: ${{ github.event.inputs.flavour == 'release' }} | |
jobs: | |
testFlightDeploy: | |
permissions: | |
id-token: write | |
contents: read | |
name: "Test Flight Deploy" | |
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' && !(contains(github.event.head_commit.message, '[skip cd]') || contains(github.event.head_commit.message, '[cd skip]')) }} | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Configure AWS credentials to fetch secrets | |
uses: RDXWorks-actions/configure-aws-credentials@main | |
with: | |
role-to-assume: ${{ secrets.GH_WALLET_SECRET_ACCESS }} | |
aws-region: "eu-west-2" | |
role-session-name: 'babylon-wallet-ios-${{ github.run_id }}-${{ github.run_attempt }}' | |
- name: Fetch AWS secrets | |
uses: RDXWorks-actions/aws-secretsmanager-get-secrets@main | |
with: | |
secret-ids: | | |
WALLET, ${{ secrets.AWS_SECRET_NAME_WALLET }} | |
parse-json-secrets: true | |
- name: Fetch AWS secrets | |
uses: RDXWorks-actions/aws-secretsmanager-get-secrets@main | |
with: | |
secret-ids: | | |
SWIFT_SSH, ${{ secrets.AWS_SECRET_NAME_WALLET_SWIFT_SSH }} | |
parse-json-secrets: true | |
- name: Fetch AWS secrets | |
uses: RDXWorks-actions/aws-secretsmanager-get-secrets@main | |
with: | |
secret-ids: | | |
FASTLANE_MATCH_REPO_SSH_KEY, ${{ secrets.AWS_SECRET_NAME_WALLET_FASTLANE_SSH }} | |
parse-json-secrets: true | |
- name: Fetch webhook AWS secrets | |
uses: RDXWorks-actions/aws-secretsmanager-get-secrets@main | |
with: | |
secret-ids: | | |
WEBHOOK, ${{ secrets.AWS_SECRET_NAME_SLACK_WEBHOOK }} | |
parse-json-secrets: true | |
- uses: RDXWorks-actions/ssh-agent@master | |
with: | |
ssh-private-key: | | |
${{ env.SWIFT_SSH }} | |
${{ env.FASTLANE_MATCH_REPO_SSH_KEY }} | |
- uses: RDXWorks-actions/checkout@main | |
with: | |
token: ${{ env.WALLET_RADIX_BOT_PAT }} | |
- uses: RDXWorks-actions/setup-ruby@master-upgrade-to-v1-171-0 | |
with: | |
ruby-version: 3.1.2 | |
bundler-cache: true | |
- uses: RDXWorks-actions/setup-xcode@master | |
with: | |
xcode-version: "15.3.0" | |
- uses: RDXWorks-actions/ssh-agent@master | |
with: | |
ssh-private-key: | | |
${{ env.SWIFT_SSH }} | |
${{ env.FASTLANE_MATCH_REPO_SSH_KEY }} | |
- name: Config local env | |
run: | | |
git config user.name $GIT_USER | |
git config user.email $GIT_USER | |
echo "${{ env.WALLET_FASTLANE_SECRETS_BASE64 }}" | base64 --decode > fastlane/.env.secret | |
echo "${{ env.WALLET_GENERAL_SECRETS_BASE64 }}" | base64 --decode > .env.secret | |
brew install xcbeautify | |
env: | |
GIT_USER: ${{ env.WALLET_RADIX_BOT_USERNAME }} | |
- name: "Deploy" | |
run: | | |
FLAVOUR=alpha | |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]] | |
then | |
FLAVOUR=${{ github.event.inputs.flavour }} | |
fi | |
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES | |
bundle exec fastlane deploy --env ios.$FLAVOUR | |
env: | |
GIT_TOKEN: ${{ env.WALLET_RADIX_BOT_PAT }} | |
SLACK_WEBHOOK_URL: ${{ env.WEBHOOK_SLACK_URL }} |