[#557] Automate Release Pull Request Creation Process #615
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: Test Upload Build to TestFlight | |
# SECRETS needed: | |
### SSH_PRIVATE_KEY for Match Repo | |
### MATCH_REPO | |
### MATCH_PASS | |
### API_KEY_ID | |
### ISSUER_ID | |
### APPSTORE_CONNECT_API_KEY | |
### TEAM_ID | |
on: | |
pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install SSH key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Bundle install | |
run: bundle install | |
- name: Cache Pods | |
uses: actions/cache@v3 | |
id: cocoapodCache | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- name: Start Install Script for Template App | |
run: swift run --package-path Scripts/Swift/iOSTemplateMaker iOSTemplateMaker make --bundle-id-production co.nimblehq.ios.templates --bundle-id-staging co.nimblehq.ios.templates.staging --project-name TemplateApp --interface UIKit | |
- name: Start Setup Script for Template App TestFlight Upload | |
run: swift run --package-path Scripts/Swift/iOSTemplateMaker iOSTemplateMaker make-test-test-flight | |
env: | |
MATCH_REPO: ${{ secrets.MATCH_REPO }} | |
API_KEY_ID: ${{ secrets.API_KEY_ID }} | |
ISSUER_ID: ${{ secrets.ISSUER_ID }} | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
- name: Set Up Test Project for App Store | |
run: bundle exec fastlane setUpTestProject | |
- name: Sync App Store Code Signing | |
run: bundle exec fastlane syncAppStoreCodeSigning | |
env: | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASS }} | |
- name: Build App and Distribute to AppStore | |
run: bundle exec fastlane buildAndUploadToAppStore | |
env: | |
APPSTORE_CONNECT_API_KEY: ${{ secrets.APPSTORE_CONNECT_API_KEY }} | |
API_KEY_ID: ${{ secrets.API_KEY_ID }} | |
ISSUER_ID: ${{ secrets.ISSUER_ID }} | |
SKIP_FIREBASE_DSYM: "true" | |
BUMP_APP_STORE_BUILD_NUMBER: "true" | |
- name: Remove keychain | |
if: ${{ always() }} | |
run: bundle exec fastlane removeKeychain | |
continue-on-error: true |