Skip to content

Commit

Permalink
feat: fastlane ios (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed May 6, 2023
1 parent 568e49e commit 1b5852b
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 169 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/deploy-android.yml
Expand Up @@ -11,13 +11,7 @@ env:
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_FILE_DEBUG: ${{ secrets.ANDROID_STORE_FILE_DEBUG }}
ANDROID_STORE_FILE_RELEASE: ${{ secrets.ANDROID_STORE_FILE_RELEASE }}
APP_CENTER_API: ${{ secrets.APP_CENTER_API }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_GIT_TOKEN: ${{ secrets.FASTLANE_GIT_TOKEN }}
IOS_APPLE_KEY: ${{ secrets.IOS_APPLE_KEY }}
MAESTRO_CLOUD_API_KEY: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SLACK_URL: ${{ secrets.SLACK_URL }}

jobs:
deploy-android:
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/deploy-ios.yml
@@ -1,14 +1,14 @@
name: Test iOS
name: Deploy iOS

on:
# push:
# branches: [master]
# pull_request:
# branches: [ci-fastlane]
push:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_GIT_TOKEN: ${{ secrets.FASTLANE_GIT_TOKEN }}
IOS_APPLE_KEY: ${{ secrets.IOS_APPLE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}

jobs:
deploy-ios:
Expand Down Expand Up @@ -43,6 +43,17 @@ jobs:
- name: Install environment variables
run: yarn ci-env-vars

- name: Cache pods
uses: actions/cache@v2
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods
run: NO_FLIPPER=1 pod install --project-directory=ios

- name: Deploy iOS
uses: maierj/fastlane-action@v3.0.0
with:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -8,4 +8,4 @@ gem 'fastlane-plugin-codepush'
gem 'fastlane-plugin-rename_android_package'
gem 'fastlane-plugin-update_android_strings'
gem 'fastlane-plugin-versioning_android'
gem 'cocoapods', '>= 1.11.3'
gem 'cocoapods'
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -282,7 +282,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (>= 1.11.3)
cocoapods
fastlane
fastlane-plugin-codepush
fastlane-plugin-load_json
Expand All @@ -295,4 +295,4 @@ RUBY VERSION
ruby 3.2.2p53

BUNDLED WITH
2.2.3
2.4.12
4 changes: 2 additions & 2 deletions docs/DEPLOYING.md
Expand Up @@ -31,9 +31,9 @@ Deploy locally. No free CI.
## Examples

```sh
fastlane ios deploy app:core method:prod
fastlane ios deploy app:core method:beta
```

```sh
fastlane android deploy app:core method:prod
fastlane android deploy app:core method:beta
```
10 changes: 4 additions & 6 deletions fastlane/Fastfile
Expand Up @@ -19,7 +19,7 @@ apps = {
'progress' => { 'name' => 'Progress - Coding Tracker' }
}
api_key = app_store_connect_api_key(
key_id: 'P4P5NVV843',
key_id: 'KPX64T6SCF',
issuer_id: '69a6de8c-6c9d-47e3-e053-5b8c7c11a4d1',
key_filepath: './certs/apple-key.p8'
)
Expand Down Expand Up @@ -123,13 +123,12 @@ platform :ios do
update_info_plist(xcodeproj: xcodeproj, scheme: 'core', display_name: 'Core', app_identifier: default_app)
sh("sed -i '' 's/#{new_package_name}/com.eneff.app.core/g' ../ios/core.xcodeproj/project.pbxproj")
end
increment_build_number(xcodeproj: 1, build_number: timestamp)
increment_version_number(xcodeproj: '1.0.0', version_number: version)
increment_build_number(xcodeproj: xcodeproj, build_number: "1")
increment_version_number(xcodeproj: xcodeproj, version_number: "1.0.0")

desc 'submit to apple'
changelog_from_git_commits
upload_app_privacy_details_to_app_store(app_identifier: new_package_name, json_path: './fastlane/privacy.json')
upload_to_testflight(skip_waiting_for_build_processing: true)
upload_to_testflight(skip_waiting_for_build_processing: true, api_key: api_key)
case method_name
when 'prod'
upload_to_app_store
Expand Down Expand Up @@ -174,7 +173,6 @@ platform :android do
end

desc 'build aab (bundle) for google and apk (assemble) for tests'
changelog_from_git_commits
gradle(task: 'clean', project_dir: './android/')
gradle(task: 'bundle', build_type: 'Release', project_dir: './android/')
gradle(task: 'assemble', build_type: 'Release', project_dir: './android/')
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Matchfile
@@ -1,5 +1,5 @@
# ios certs
git_url('git@github.com:ethanneff/playground-react-native-certs.git')
git_url('git@github.com:ethanneff/certs.git')
git_basic_authorization(ENV['FASTLANE_GIT_TOKEN'])
storage_mode('git')
username('ethan.neff@eneff.com')
Expand Down

0 comments on commit 1b5852b

Please sign in to comment.