Skip to content

#TestFlight #alpha #225

#TestFlight #alpha

#TestFlight #alpha #225

Workflow file for this run

name: iOS project Run Tests
on:
push:
branches: [ Development ]
concurrency:
group: build-ios-${{ github.ref }}
cancel-in-progress: true
jobs:
TestFlight-Alpha:
if: "contains(github.event.head_commit.message, '#TestFlight') && !contains(github.event.head_commit.message, '#beta')"
runs-on: macos-12
environment: Apple TestFlight- Alpha
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '^14.0'
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: podcache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Bundle dependencies
run: bundle install
- name: CocoaPods dependencies
env:
tmdb_apiKey: ${{ secrets.TMDB_APIKEY }}
ShipBook_appId: ${{ secrets.SHIPBOOK_APPID }}
ShipBook_appKey: ${{ secrets.SHIPBOOK_APPKEY }}
kkid_apikey: ${{ secrets.KKID_APIKEY }}
newrelic_token: ${{ secrets.NEWRELIC_TOKEN }}
unsplash_accesskey: ${{ secrets.UNSPLASH_ACCESSKEY }}
unsplash_secretkey: ${{ secrets.UNSPLASH_SECRETKEY }}
MATCH_DEPLOY_KEY: $
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
run: bundle exec pod check || bundle exec pod install
- name: Fix Git
run: git config --global --add url."git@github.com:".insteadOf "https://github.com/"
- name: Add SSH Key
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${{secrets.MATCH_DEPLOY_KEY}}"
- name: Fastlane Match
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_USER: "jakumpe@justinkumpe.net"
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
run: bundle exec fastlane matchget
- name: Upload To TestFlight Alpha
if: "!contains(github.event.head_commit.message, '#beta')"
env:
APPLE_APPSTORE_API_ISSUER_ID: ${{ secrets.APPLE_APPSTORE_API_ISSUER_ID }}
APPLE_APP_STORE_API_KEY: ${{ secrets.APPLE_APP_STORE_API_KEY }}
APPLE_APP_STORE_API_KEY_ID: ${{ secrets.APPLE_APP_STORE_API_KEY_ID }}
run: bundle exec fastlane alpha
- name: Commit and Push
run: |
git config --global user.name 'Justin Kumpe (via GitHub Actions)'
git config --global user.email 'justinkumpe@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit ./KKid.xcodeproj ./KKid/Info.plist KKidUITests/Info.plist ./fastlane/ -m "Pushed to TestFlight and bumped Build Version Number"
git push
TestFlight-Beta:
if: "contains(github.event.head_commit.message, '#TestFlight') && contains(github.event.head_commit.message, '#beta')"
runs-on: macos-12
environment:
name: Apple TestFlight- Beta
url: https://kkid-beta.kumpe.app
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '^14.0'
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: podcache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Bundle dependencies
run: bundle install
- name: CocoaPods dependencies
env:
tmdb_apiKey: ${{ secrets.TMDB_APIKEY }}
ShipBook_appId: ${{ secrets.SHIPBOOK_APPID }}
ShipBook_appKey: ${{ secrets.SHIPBOOK_APPKEY }}
kkid_apikey: ${{ secrets.KKID_APIKEY }}
newrelic_token: ${{ secrets.NEWRELIC_TOKEN }}
unsplash_accesskey: ${{ secrets.UNSPLASH_ACCESSKEY }}
unsplash_secretkey: ${{ secrets.UNSPLASH_SECRETKEY }}
MATCH_DEPLOY_KEY: $
run: bundle exec pod check || bundle exec pod install
- name: Fix Git
run: git config --global --add url."git@github.com:".insteadOf "https://github.com/"
- name: Add SSH Key
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${MATCH_DEPLOY_KEY}"
- name: Fastlane Match
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_USER: "jakumpe@justinkumpe.net"
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
run: bundle exec fastlane matchget
- name: Upload To TestFlight Beta
if: "contains(github.event.head_commit.message, '#beta')"
env:
APPLE_APPSTORE_API_ISSUER_ID: ${{ secrets.APPLE_APPSTORE_API_ISSUER_ID }}
APPLE_APP_STORE_API_KEY: ${{ secrets.APPLE_APP_STORE_API_KEY }}
APPLE_APP_STORE_API_KEY_ID: ${{ secrets.APPLE_APP_STORE_API_KEY_ID }}
run: bundle exec fastlane beta
- name: Commit and Push
run: |
git config --global user.name 'Justin Kumpe (via GitHub Actions)'
git config --global user.email 'justinkumpe@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit ./KKid.xcodeproj ./KKid/Info.plist KKidUITests/Info.plist ./fastlane/ -m "Pushed to TestFlight for Public Beta and bumped Build Version Number"
git push