mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-11 04:07:56 -06:00
feat: Update github action and fastlane configuration
This commit is contained in:
16
.github/workflows/release-deploy-play-store.yml
vendored
16
.github/workflows/release-deploy-play-store.yml
vendored
@@ -5,21 +5,18 @@ on:
|
||||
# Enable manual run
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
lane:
|
||||
description: "Fastlane lane"
|
||||
required: true
|
||||
default: "alpha"
|
||||
track:
|
||||
description: "Track"
|
||||
type: choice
|
||||
default: beta
|
||||
options:
|
||||
- internal
|
||||
- promote_to_alpha
|
||||
- alpha
|
||||
- promote_to_beta
|
||||
- beta
|
||||
- promote_to_production
|
||||
- production
|
||||
|
||||
is_draft:
|
||||
description: "Only create a draft and don't automatically publish?"
|
||||
description: "Mark as draft"
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
@@ -64,8 +61,7 @@ jobs:
|
||||
working-directory: android
|
||||
|
||||
# Build and deploy with Fastlane
|
||||
# Naturally, promote_to_{alpha|beta|production} only deploys.
|
||||
- run: bundle exec fastlane ${{ github.event.inputs.lane }} is_draft:${{ github.event.inputs.is_draft }}
|
||||
- run: bundle exec fastlane publish_in_play_store is_draft:${{ github.event.inputs.is_draft }} track:${{ github.event.inputs.track }}
|
||||
env:
|
||||
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }}
|
||||
working-directory: android
|
||||
|
||||
@@ -21,78 +21,30 @@ platform :android do |options|
|
||||
gradle(task: "test")
|
||||
end
|
||||
|
||||
desc "Submit a new internal build to Google Play"
|
||||
lane :internal do |options|
|
||||
desc "Submit build to Google Play"
|
||||
lane :publish_in_play_store do |options|
|
||||
release_status = (options[:is_draft] ? "draft" : "completed")
|
||||
track = (options[:track])
|
||||
sh "flutter build appbundle -v"
|
||||
upload_to_play_store(
|
||||
track: 'internal',
|
||||
track: track,
|
||||
release_status: release_status,
|
||||
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
||||
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
|
||||
release_status: options[:is_draft] ? "draft" : "completed",
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
desc "Promote internal track to alpha"
|
||||
lane :promote_to_alpha do |options|
|
||||
desc "Promote track"
|
||||
lane :play_store_promote do |options|
|
||||
track = options[:track]
|
||||
promote_to = options[:promote_to_track]
|
||||
upload_to_play_store(
|
||||
track: 'internal',
|
||||
track_promote_to: 'alpha',
|
||||
track: track,
|
||||
track_promote_to: promote_to,
|
||||
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new alpha build to Google Play"
|
||||
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: options[:is_draft] ? "draft" : "completed",
|
||||
)
|
||||
end
|
||||
|
||||
desc "Promote alpha track to beta"
|
||||
lane :promote_to_beta do |options|
|
||||
upload_to_play_store(
|
||||
track: 'alpha',
|
||||
track_promote_to: 'beta',
|
||||
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new beta build to Google Play"
|
||||
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: options[:is_draft] ? "draft" : "completed",
|
||||
)
|
||||
end
|
||||
|
||||
desc "Promote beta track to prod"
|
||||
lane :promote_to_production do |options|
|
||||
upload_to_play_store(
|
||||
track: 'beta',
|
||||
track_promote_to: 'production',
|
||||
json_key_data: ENV['PLAY_STORE_CREDENTIALS'],
|
||||
)
|
||||
end
|
||||
|
||||
desc "Submit a new production build to Google Play"
|
||||
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: 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"
|
||||
|
||||
Reference in New Issue
Block a user