Reputation: 455
In play console when you create a release it is possible to provide a release name. But when using upload_to_play_store command in fastlane i cannot see a parameter to provide a custom release name when pushing the apk, but takes the version name as the release name. How is it possible to achieve it?
lane :beta do
gradle(
task: 'assemble',
build_type: 'Release'
)
upload_to_play_store(track:'beta')
end
Upvotes: 2
Views: 2162
Reputation: 5643
While Aaron Brager's answer was correct at the time this was asked, the version_name
parameter has been added to the upload_to_play_store
(aka supply
) action since version 2.136.0
of fastlane.
Following the naming convention of releases in the Google Play Console, you could use something like this in your Fastfile for your lane:
version_name: build_number + "(" + version_name + ")", # 1 (0.0.1)
So your lane could be defined like this:
lane :beta do
gradle(
task: 'assemble',
build_type: 'Release'
)
upload_to_play_store(
track: "beta",
version_name: build_number + "(" + version_name + ")", # 1 (0.0.1)
)
end
More info
Upvotes: 8
Reputation: 66302
fastlane uses Google's AndroidPublisherService
to upload APKs. Uploads are done via its upload_apk
instance method. This method does not appear to take an argument for the release name, so fastlane does not expose one.
If you can figure out how to set the release name using AndroidPublisherService
, you can pass a parameter through to the service via fastlane here.
Upvotes: 2