mirror of
https://github.com/bitwarden/android.git
synced 2025-12-11 04:39:19 -06:00
[PM-8985] Distribute beta builds on every push to main (#3351)
This commit is contained in:
parent
159cb02899
commit
a3c72e572c
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -368,8 +368,8 @@ jobs:
|
|||||||
bundle exec fastlane run validate_play_store_json_key
|
bundle exec fastlane run validate_play_store_json_key
|
||||||
|
|
||||||
- name: Publish Play Store bundle
|
- name: Publish Play Store bundle
|
||||||
if: ${{ matrix.variant == 'prod' && matrix.artifact == 'aab' && inputs.publish-to-play-store }}
|
if: ${{ matrix.variant == 'prod' && matrix.artifact == 'aab' && (inputs.publish-to-play-store || github.ref_name == 'main') }}
|
||||||
run: bundle exec fastlane publishForInternalTesting
|
run: bundle exec fastlane publishBetaToPlayStore
|
||||||
|
|
||||||
publish_fdroid:
|
publish_fdroid:
|
||||||
name: Publish F-Droid artifacts
|
name: Publish F-Droid artifacts
|
||||||
|
|||||||
@ -126,7 +126,26 @@ platform :android do
|
|||||||
currentVersionName = buildConfigText.match(/versionName = "(.+)"/).captures[0]
|
currentVersionName = buildConfigText.match(/versionName = "(.+)"/).captures[0]
|
||||||
|
|
||||||
if options[:versionName].nil? or options[:versionName].to_s.empty?
|
if options[:versionName].nil? or options[:versionName].to_s.empty?
|
||||||
nextVersionName = currentVersionName
|
puts "Getting latest version name from previous git tag..."
|
||||||
|
latestTag = `git tag --sort=committerdate --list | tail -1`
|
||||||
|
puts "Using previous tag (#{latestTag}) to calculate version name..."
|
||||||
|
latestTag.slice!(0)
|
||||||
|
puts "Current version name resolved to #{latestTag}."
|
||||||
|
|
||||||
|
versionParts = latestTag.split(".")
|
||||||
|
currentMajor = versionParts[0]
|
||||||
|
currentMinor = versionParts[1]
|
||||||
|
currentRevision = versionParts[2]
|
||||||
|
|
||||||
|
currentDate = Time.new
|
||||||
|
major = currentDate.year.to_s
|
||||||
|
minor = currentDate.strftime "%-m"
|
||||||
|
|
||||||
|
revision = 0
|
||||||
|
if currentMajor == major and currentMinor == minor
|
||||||
|
revision = currentRevision.to_i + 1
|
||||||
|
end
|
||||||
|
nextVersionName = "#{major}.#{minor}.#{revision}"
|
||||||
else
|
else
|
||||||
nextVersionName = options[:versionName].to_s
|
nextVersionName = options[:versionName].to_s
|
||||||
end
|
end
|
||||||
@ -193,19 +212,13 @@ platform :android do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Publish PlayStore bundle to Google Play Store Internal testing track"
|
desc "Publish Play Store Beta bundle to Google Play Store"
|
||||||
lane :publishForInternalTesting do
|
lane :publishBetaToPlayStore do
|
||||||
upload_to_play_store(
|
|
||||||
package_name: "com.x8bit.bitwarden",
|
|
||||||
track: "internal",
|
|
||||||
release_status: "draft",
|
|
||||||
aab: "app/build/outputs/bundle/standardRelease/com.x8bit.bitwarden-standard-release.aab"
|
|
||||||
)
|
|
||||||
upload_to_play_store(
|
upload_to_play_store(
|
||||||
package_name: "com.x8bit.bitwarden.beta",
|
package_name: "com.x8bit.bitwarden.beta",
|
||||||
track: "internal",
|
track: "Public",
|
||||||
release_status: "draft",
|
release_status: "draft",
|
||||||
aab: "app/build/outputs/bundle/standardBeta/com.x8bit.bitwarden-standard-beta.aab"
|
aab: "app/build/outputs/bundle/standardBeta/com.x8bit.bitwarden-standard-beta.aab",
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user