Skip to content

Commit

Permalink
Upload iOS App to testflight
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-powell committed Dec 21, 2023
1 parent 07953ff commit 5fcbe45
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/snapshots/**/*.png filter=lfs diff=lfs merge=lfs -text
38 changes: 36 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,42 @@ jobs:
- name: Build with Xcode
run: xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -configuration Debug -destination generic/platform=iOS -archivePath $RUNNER_TEMP/Tidy.xcarchive

- name: Upload Artifacts
- name: Upload Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: iOS Archive
path: $RUNNER_TEMP/Tidy/**/*.xcarchive
path: $RUNNER_TEMP/Tidy/**/*.xcarchive

# Only run the following steps when a push event occurs on main branch
- name: Build App Artifact with Xcode
if: github.event_name == 'push'
env:
EXPORT_OPTIONS_PLIST: ${{ secrets.IOS_EXPORT_OPTIONS }}
run: |
EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist
echo -n "IOS_EXPORT_OPTIONS" | base64 --decode -o $RUNNER_TEMP/exportOptions.plist
xcodebuild -archivePath $RUNNER_TEMP/iosApp.xcarchive
-exportArchive -exportPath '$RUNNER_TEMP/Tidy.app'
-exportOptionsPlist $RUNNER_TEMP/exportOptions.plist
- name: Upload to Github Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: app
path: $RUNNER_TEMP/**/*.app

- name: Copy App Store Private Key
if: github.event_name == 'push'
env:
IOS_APPSTORE_PRIVATE_KEY: ${{ secrets.IOS_APPSTORE_PRIVATE_KEY }}
run: echo -n "$IOS_APPSTORE_PRIVATE_KEY" | base64 --decode -o $RUNNER_TEMP/appstore_private_key.p8

- name: Upload app to TestFlight
if: github.event_name == 'push'
uses: apple-actions/upload-testflight-build@v1
with:
app-path: $RUNNER_TEMP/Tidy.app
issuer-id: ${{ secrets.IOS_APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.IOS_APPSTORE_API_KEY_ID }}
api-private-key: $RUNNER_TEMP/appstore_private_key.p8

0 comments on commit 5fcbe45

Please sign in to comment.