Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
markgravity committed Feb 26, 2024
1 parent e715a8a commit c5cd12f
Show file tree
Hide file tree
Showing 6 changed files with 411 additions and 20 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/test_add_device_profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Test Add device and regenerate profiles with fastlane match
### MATCH_PASSWORD

on:
pull_request:
workflow_dispatch:
inputs:
devices:
Expand All @@ -23,7 +24,7 @@ on:
jobs:
create_files:
name: Create certificates and profiles
runs-on: [self-hosted, macOS]
runs-on: macOS-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
Expand All @@ -35,15 +36,47 @@ jobs:
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- 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 Firebase Upload
run: swift run --package-path Scripts/Swift/iOSTemplateMaker iOSTemplateMaker make-test-firebase
env:
MATCH_REPO: ${{ secrets.MATCH_REPO }}
STAGING_FIREBASE_APP_ID: ${{ secrets.STAGING_FIREBASE_APP_ID }}
TEAM_ID: ${{ secrets.TEAM_ID }}

- name: Set Up Test Project for Firebase
run: bundle exec fastlane setUpTestProject

- name: Bundle install
run: bundle install

- name: Decode APPSTORE_CONNECT_API_KEY Base64 Secret
env:
ENCODED_SECRET: ${{ secrets.APPSTORE_CONNECT_API_KEY }}
run: |
DECODED_SECRET=$(echo "$ENCODED_SECRET" | base64 -d)
echo "::set-env name=DECODED_APPSTORE_CONNECT_API_KEY::$DECODED_SECRET"
- name: Add device and regenerate profiles with match
run: bundle exec fastlane addDevicesGenerateProfiles
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASS }}
DEVICES: ${{ inputs.devices }}
PLATFORM: ${{ inputs.platform }}
DEVICES: '{"Luka iPhone 6": "1234567890123456789012345678901234567890","Felix iPad Air 2": "abcdefghijklmnopqrstvuwxyzabcdefghijklmn"}'
APPSTORE_CONNECT_API_KEY: $DECODED_APPSTORE_CONNECT_API_KEY
API_KEY_ID: ${{ secrets.API_KEY_ID }}
ISSUER_ID: ${{ secrets.ISSUER_ID }}
PLATFORM: "ios"

- name: Clean up keychain
if: ${{ always() }}
Expand Down
Loading

0 comments on commit c5cd12f

Please sign in to comment.