mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Start implementing automatic builds
This commit is contained in:
9
.github/workflows/android-release.yml
vendored
9
.github/workflows/android-release.yml
vendored
@@ -1,7 +1,8 @@
|
|||||||
name: Google Play release
|
name: Google Play release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- 'release/*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy_android:
|
deploy_android:
|
||||||
@@ -38,6 +39,12 @@ jobs:
|
|||||||
- name: Generated translation files
|
- name: Generated translation files
|
||||||
run: flutter gen-l10n
|
run: flutter gen-l10n
|
||||||
|
|
||||||
|
- name: Bump version
|
||||||
|
uses: maierj/fastlane-action@v2.0.0
|
||||||
|
with:
|
||||||
|
lane: setVersion
|
||||||
|
subdirectory: android
|
||||||
|
|
||||||
- name: Build AAB
|
- name: Build AAB
|
||||||
run: flutter build appbundle --release --no-sound-null-safety
|
run: flutter build appbundle --release --no-sound-null-safety
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ platform :android do
|
|||||||
desc "Upload app to production"
|
desc "Upload app to production"
|
||||||
lane :production do
|
lane :production do
|
||||||
begin
|
begin
|
||||||
# gradle(
|
|
||||||
# task: 'assemble',
|
|
||||||
# build_type: 'Release'
|
|
||||||
#)
|
|
||||||
upload_to_play_store(
|
upload_to_play_store(
|
||||||
track: 'production',
|
track: 'production',
|
||||||
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
||||||
@@ -43,6 +39,29 @@ platform :android do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Sets the version name and code in pubspec.yaml"
|
||||||
|
lane :setVersion do
|
||||||
|
begin
|
||||||
|
old_version_code = google_play_track_version_codes(
|
||||||
|
package_name: "de.wger.flutter",
|
||||||
|
track: "alpha",
|
||||||
|
json_key: "./fastlane/envfiles/playstore.json",
|
||||||
|
)
|
||||||
|
puts "old_version_code: " + old_version_code.to_s
|
||||||
|
new_version_code = old_version_code.last().to_i + 1
|
||||||
|
puts "new_version_code: " + new_version_code.to_s
|
||||||
|
|
||||||
|
new_version_name = get_version_number_from_git_branch(pattern: 'release/#')
|
||||||
|
puts new_version_name.to_s
|
||||||
|
|
||||||
|
flutter_set_version(
|
||||||
|
path_to_yaml: "../pubspec.yaml",
|
||||||
|
version_name: new_version_name.to_s,
|
||||||
|
version_code: new_version_code.to_s,
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
desc "Upload closed alpha app and update store entry"
|
desc "Upload closed alpha app and update store entry"
|
||||||
lane :update_alpha do
|
lane :update_alpha do
|
||||||
@@ -57,10 +76,4 @@ platform :android do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Deploy a new version to the Google Play"
|
|
||||||
lane :deploy do
|
|
||||||
gradle(task: "clean assembleRelease")
|
|
||||||
upload_to_play_store
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
6
android/fastlane/Pluginfile
Normal file
6
android/fastlane/Pluginfile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Autogenerated by fastlane
|
||||||
|
#
|
||||||
|
# Ensure this file is checked in to source control!
|
||||||
|
|
||||||
|
gem 'fastlane-plugin-versioning'
|
||||||
|
gem 'fastlane-plugin-flutter_dart_version_manager'
|
||||||
Reference in New Issue
Block a user