ci: Deploy to TestFlight from Github Actions

This commit is contained in:
Krille 2023-09-08 09:25:45 +02:00
parent ef572f9bc5
commit 2e3cd5531e
No known key found for this signature in database
6 changed files with 78 additions and 46 deletions

View file

@ -132,20 +132,57 @@ jobs:
- name: Get Tag Name
id: tag_name
run: echo "::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})"
- name: Deploy Android Release
- name: Copy aab file to build dir
run: |
mkdir -p build/android
cp build/app/outputs/bundle/release/app-release.aab build/android/
cd android
bundle install
bundle update fastlane
bundle exec fastlane deploy_internal_test
- name: Update fastlane
run: bundle install && bundle update fastlane
working-directory: android
- name: Deploy to Internal test
working-directory: android
run: bundle exec fastlane deploy_internal_test
- name: Deploy Android Release
working-directory: android
run: |
if [[ $GITHUB_REF_NAME == rc* ]]; then
bundle exec fastlane deploy_candidate
else
bundle exec fastlane deploy_release
fi
cd ..
deploy_testflight:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.5.1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- run: gem install fastlane -NV
- name: Apply Google Services Patch
run: git apply ./scripts/enable-android-google-services.patch
- run: flutter pub get
- name: Update fastlane
run: bundle install && bundle update fastlane
working-directory: ios
- name: Import iOS Certificates
run: print('TODO') # https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
- name: Install Cocoapod Dependencies
working-directory: ios
run: pod install
- name: Push a new beta build to TestFlight
working-directory: ios
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
run: bundle exec fastlane beta
promote_snapcraft:
runs-on: ubuntu-latest

View file

@ -27,7 +27,7 @@ platform :ios do
version_name = config.match(re).captures[0]
increment_version_number(version_number: version_name)
build_app(workspace: "Runner.xcworkspace", scheme: "Runner")
upload_to_testflight(distribute_external: true, groups: "FluffyChat Betatest")
upload_to_testflight(distribute_external: true, groups: "FluffyChat Betatest", changelog: "Bugfixes and performance improvements.")
end
end

View file

@ -1,37 +1,43 @@
fastlane documentation
================
----
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```
```sh
xcode-select --install
```
Install _fastlane_ using
```
[sudo] gem install fastlane -NV
```
or alternatively using `brew install fastlane`
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
### release
```sh
[bundle exec] fastlane release
```
fastlane release
```
----
## iOS
### ios beta
```sh
[bundle exec] fastlane ios beta
```
fastlane ios beta
```
Push a new beta build to TestFlight
----
This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

View file

@ -5,22 +5,32 @@
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.001276">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.002242">
</testcase>
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="2.624976">
<testcase classname="fastlane.lanes" name="1: latest_testflight_build_number" time="8.581516">
</testcase>
<testcase classname="fastlane.lanes" name="2: build_app" time="628.480972">
<testcase classname="fastlane.lanes" name="2: increment_build_number" time="2.675187">
</testcase>
<testcase classname="fastlane.lanes" name="3: upload_to_testflight" time="895.02171">
<testcase classname="fastlane.lanes" name="3: increment_version_number" time="2.093515">
</testcase>
<testcase classname="fastlane.lanes" name="4: build_app" time="283.168776">
</testcase>
<testcase classname="fastlane.lanes" name="5: upload_to_testflight" time="903.699966">
</testcase>

View file

@ -1,15 +0,0 @@
#!/bin/sh -ve
git apply ./scripts/enable-android-google-services.patch
flutter clean
flutter pub get
cd ios
rm -rf Pods
rm -f Podfile.lock
arch -x86_64 pod install
arch -x86_64 pod update
cd ..
flutter build ios --release
cd ios
bundle update fastlane
bundle exec fastlane beta
cd ..

View file

@ -1,6 +0,0 @@
#!/bin/sh -ve
flutter pub upgrade --major-versions
flutter pub get
dart fix --apply
flutter format lib test
flutter pub run import_sorter:main --no-comments