IOS Deploy for mabulle on temp/testflight_mabulle_20230918 #67
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: IOS Deploy | |
run-name: IOS Deploy for ${{ inputs.brand }} on ${{github.ref_name}} | |
on: | |
workflow_dispatch: | |
inputs: | |
brand: | |
description: 'Brand to publish' | |
required: true | |
default: 'cozy' | |
type: choice | |
options: | |
- cozy | |
- mabulle | |
jobs: | |
ios-build: | |
name: IOS Deploy | |
runs-on: macos-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Set NodeJS version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Setup Ruby (bundle) | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.6 | |
bundler-cache: true | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Restore node_modules from cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Restore Pods cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
ios/Pods | |
~/Library/Caches/CocoaPods | |
~/.cocoapods | |
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile --network-timeout 300000 | |
- name: Install Pods | |
run: cd ios && pod install --repo-update && cd .. | |
- name: Set white label brand | |
run: yarn brand:configure:${{ inputs.brand }} --force | |
- name: Build IOS App | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
uses: yukiarrr/ios-build-action@v1.5.0 | |
with: | |
project-path: ios/CozyReactNative.xcodeproj | |
p12-base64: ${{ secrets.IOS_P12_BASE64 }} | |
mobileprovision-base64: ${{ secrets[format('{0}_IOS_MOBILE_PROVISION_BASE64', inputs.brand)] }} | |
code-signing-identity: 'iPhone Distribution' | |
team-id: ${{ secrets.IOS_TEAM_ID }} | |
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} | |
workspace-path: ios/CozyReactNative.xcworkspace | |
scheme: CozyReactNative | |
- name: Upload CozyReactNative-CozyReactNative.log | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CozyReactNative-CozyReactNative.log | |
path: /Users/runner/Library/Logs/gym/CozyReactNative-CozyReactNative.log | |
- name: 'Upload app to TestFlight' | |
uses: apple-actions/upload-testflight-build@v1 | |
with: | |
app-path: 'output.ipa' | |
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} | |
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }} |