From bc100674aaa353d70f8a91fbc0cce2652aa4c655 Mon Sep 17 00:00:00 2001 From: siepra Date: Mon, 23 Oct 2023 10:29:59 +0200 Subject: [PATCH] chore: use fastlane for uploading to testflight --- .github/workflows/mobile-deploy-ios.yml | 22 ++++++++++------------ lerna.json | 2 +- packages/mobile/.gitignore | 2 ++ packages/mobile/Gemfile | 4 +++- packages/mobile/fastlane/Fastfile | 8 ++++++++ 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 packages/mobile/fastlane/Fastfile diff --git a/.github/workflows/mobile-deploy-ios.yml b/.github/workflows/mobile-deploy-ios.yml index e5c85d39f4..a873872702 100644 --- a/.github/workflows/mobile-deploy-ios.yml +++ b/.github/workflows/mobile-deploy-ios.yml @@ -24,7 +24,10 @@ jobs: with: lfs: true - - name: Install gpg + - name: Install Fastlane + run: gem install fastlane + + - name: Install GPG run: brew install gnupg - name: Setup XCode @@ -76,16 +79,11 @@ jobs: name: Quiet.ipa path: ./packages/mobile/ios/build/Quiet.ipa - - name: Submit to the store + - name: Submit to TestFlight run: | - cd ./packages/mobile/ios - xcrun altool \ - --upload-app \ - --type ios \ - --file build/Quiet.ipa \ - -u $APPSTORE_USER \ - -p $APPSTORE_PASSWORD \ - --verbose + cd ./packages/mobile + fastlane ios beta env: - APPSTORE_USER: ${{ secrets.APPSTORE_USER }} - APPSTORE_PASSWORD: ${{ secrets.APPSTORE_PASSWORD }} + APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} + APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} diff --git a/lerna.json b/lerna.json index aca35a8710..72401e6bd4 100644 --- a/lerna.json +++ b/lerna.json @@ -5,7 +5,7 @@ "version": "independent", "command": { "version": { - "allowBranch": ["master", "develop"], + "allowBranch": ["master", "develop", "chore/ios-fastlane-upload"], "conventionalCommits": true, "createRelease": "github" }, diff --git a/packages/mobile/.gitignore b/packages/mobile/.gitignore index 058c9ae212..9e215281ef 100644 --- a/packages/mobile/.gitignore +++ b/packages/mobile/.gitignore @@ -63,6 +63,8 @@ buck-out/ **/fastlane/screenshots **/fastlane/test_output +**/fastlane/.env.default + # Bundle artifact *.jsbundle diff --git a/packages/mobile/Gemfile b/packages/mobile/Gemfile index efd98cadaf..1e70d9d0bf 100644 --- a/packages/mobile/Gemfile +++ b/packages/mobile/Gemfile @@ -1,4 +1,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby '2.7.5' -gem 'cocoapods', '~> 1.11', '>= 1.11.2' \ No newline at end of file +gem 'cocoapods', '~> 1.11', '>= 1.11.2' + +gem 'fastlane' diff --git a/packages/mobile/fastlane/Fastfile b/packages/mobile/fastlane/Fastfile new file mode 100644 index 0000000000..00f71f5411 --- /dev/null +++ b/packages/mobile/fastlane/Fastfile @@ -0,0 +1,8 @@ +fastlane_version '2.216.0' + +platform :ios do + desc 'Ship to TestFlight' + lane :beta do + pilot upload + end +end