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