chore: Restructure github action, add github create release action, update fastfile

This commit is contained in:
Anton Stubenbord
2023-04-27 19:29:38 +02:00
parent 79a3c3bfdc
commit b39192981d
8 changed files with 236 additions and 69 deletions

View File

@@ -15,26 +15,26 @@
default_platform(:android)
platform :android do
platform :android do |options|
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Submit a new internal build to Google Play"
lane :internal do
lane :internal do |options|
sh "flutter build appbundle -v"
upload_to_play_store(
track: 'internal',
aab: '../build/app/outputs/bundle/release/app-release.aab',
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
release_status: "draft",
release_status: options[:is_draft] ? "draft" : "completed",
)
end
desc "Promote internal track to alpha"
lane :promote_to_alpha do
lane :promote_to_alpha do |options|
upload_to_play_store(
track: 'internal',
track_promote_to: 'alpha',
@@ -43,18 +43,18 @@ platform :android do
end
desc "Submit a new alpha build to Google Play"
lane :alpha do
lane :alpha do |options|
sh "flutter build appbundle -v"
upload_to_play_store(
track: 'alpha',
aab: '../build/app/outputs/bundle/release/app-release.aab',
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
release_status: "draft",
release_status: options[:is_draft] ? "draft" : "completed",
)
end
desc "Promote alpha track to beta"
lane :promote_to_beta do
lane :promote_to_beta do |options|
upload_to_play_store(
track: 'alpha',
track_promote_to: 'beta',
@@ -63,18 +63,18 @@ platform :android do
end
desc "Submit a new beta build to Google Play"
lane :beta do
lane :beta do |options|
sh "flutter build appbundle -v"
upload_to_play_store(
track: 'beta',
aab: '../build/app/outputs/bundle/release/app-release.aab',
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
release_status: "draft",
release_status: options[:is_draft] ? "draft" : "completed",
)
end
desc "Promote beta track to prod"
lane :promote_to_production do
lane :promote_to_production do |options|
upload_to_play_store(
track: 'beta',
track_promote_to: 'production',
@@ -83,13 +83,34 @@ platform :android do
end
desc "Submit a new production build to Google Play"
lane :production do
lane :production do |options|
sh "flutter build appbundle -v"
upload_to_play_store(
track: 'production',
aab: '../build/app/outputs/bundle/release/app-release.aab',
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
release_status: "draft",
release_status: options[:is_draft] ? "draft" : "completed",
)
end
desc "Builds apks and creates a new release on GitHub"
lane :github do |options|
sh "flutter build apk --split-per-abi --release"
sh "flutter build apk --release"
set_github_release(
repository_name: "astubenbord/paperless-mobile",
api_token: ENV["GH_ACCESS_TOKEN"],
name: "v" + flutter_version()["version_name"],
tag_name: "v" + flutter_version()["version_name"],
is_generate_release_notes: true,
is_draft: options[:is_draft],
commitish: options[:branch],
upload_assets: [
"../build/app/outputs/flutter-apk/app-x86_64-release.apk",
"../build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk",
"../build/app/outputs/flutter-apk/app-arm64-v8a-release.apk",
"../build/app/outputs/flutter-apk/app-release.apk"
],
)
end
end

View File

@@ -23,21 +23,69 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
Runs all the tests
### android internal
```sh
[bundle exec] fastlane android internal
```
Submit a new internal build to Google Play
### android promote_to_alpha
```sh
[bundle exec] fastlane android promote_to_alpha
```
Promote internal track to alpha
### android alpha
```sh
[bundle exec] fastlane android alpha
```
Submit a new alpha build to Google Play
### android promote_to_beta
```sh
[bundle exec] fastlane android promote_to_beta
```
Promote alpha track to beta
### android beta
```sh
[bundle exec] fastlane android beta
```
Submit a new Beta Build to Crashlytics Beta
Submit a new beta build to Google Play
### android deploy
### android promote_to_production
```sh
[bundle exec] fastlane android deploy
[bundle exec] fastlane android promote_to_production
```
Deploy a new version to the Google Play
Promote beta track to prod
### android production
```sh
[bundle exec] fastlane android production
```
Submit a new production build to Google Play
### android github
```sh
[bundle exec] fastlane android github
```
Builds apks and creates a new release on GitHub
----

View File

@@ -2,15 +2,32 @@
<testsuites>
<testsuite name="fastlane.lanes">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.0014968">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.0011077">
</testcase>
<testcase classname="fastlane.lanes" name="1: clean assembleRelease" time="96.2749608">
<testcase classname="fastlane.lanes" name="1: flutter build apk --split-per-abi --release" time="22.0839974">
</testcase>
<testcase classname="fastlane.lanes" name="2: flutter build apk --release" time="22.6372297">
</testcase>
<testcase classname="fastlane.lanes" name="3: flutter_version" time="0.0040597">
</testcase>
<testcase classname="fastlane.lanes" name="4: flutter_version" time="0.0029306">
</testcase>
<testcase classname="fastlane.lanes" name="5: set_github_release" time="3.0916503">
</testcase>