-
-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Deploy iOS-Swift to Testflight (#918)
Every commit on master triggers a deployment of the iOS-Swift Sample app to Testflight.
- Loading branch information
1 parent
88e893e
commit 86411cd
Showing
9 changed files
with
349 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Upload to Testflight | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
FASTLANE_KEYCHAIN_NAME: fastlane.keychain | ||
|
||
jobs: | ||
|
||
upload_to_testflight: | ||
name: Build and Upload iOS-Swift to Testflight | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ./scripts/ci-select-xcode.sh | ||
|
||
# The Github Actions hang when Xcode is trying to sign the app because | ||
# a modal window pops up to access the signing key's keychain. This modal | ||
# lets the action hang. A workaround is to create a local keychain and | ||
# store the signing keys in there. | ||
# https://github.com/actions/virtual-environments/issues/1820#issuecomment-719549887 | ||
|
||
# Sometimes the keychain already exists | ||
- name: Delete local keychain | ||
continue-on-error: true | ||
run: security delete-keychain $FASTLANE_KEYCHAIN_NAME | ||
|
||
- name: Create local keychain | ||
run: | | ||
security create-keychain -p ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} $FASTLANE_KEYCHAIN_NAME | ||
security set-keychain-settings -lut 21600 $FASTLANE_KEYCHAIN_NAME | ||
security unlock-keychain -p ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} $FASTLANE_KEYCHAIN_NAME | ||
security list-keychain -d user -s $FASTLANE_KEYCHAIN_NAME | ||
- uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
|
||
- name: Setup fastlane | ||
run: bundle install | ||
|
||
# We upload a new version to TestFlight on every commit on Master | ||
# So we need to bump the bundle version each time | ||
- name: Bump Bundle Version | ||
env: | ||
FASTLANE_BUNDLE_VERSION: $GITHUB_RUN_NUMBER | ||
run: bundle exec fastlane bump_bundle_version | ||
shell: sh | ||
|
||
- name: Run Fastlane | ||
env: | ||
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | ||
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
FASTLANE_USER: ${{ secrets.FASTLANE_USER }} | ||
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} | ||
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | ||
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
run: bundle exec fastlane ios_swift_to_testflight | ||
shell: sh | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ source "https://rubygems.org" | |
|
||
gem "bundler", ">= 2" | ||
gem "cocoapods", ">= 1.9.1" | ||
gem "fastlane" | ||
gem "rest-client" |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
app_identifier("io.sentry.sample.iOS-Swift") # The bundle identifier of your app | ||
|
||
itc_team_id("96157806") # App Store Connect Team ID | ||
team_id("97JCY7859U") # Developer Portal Team ID | ||
|
||
# For more information about the Appfile, see: | ||
# https://docs.fastlane.tools/advanced/#appfile | ||
|
Oops, something went wrong.