-
Notifications
You must be signed in to change notification settings - Fork 38
/
step.yml
executable file
·212 lines (193 loc) · 9.46 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
title: Google Play Deploy
summary: Upload your Android app to Google Play.
description: |-
The Step uploads your Android app to Google Play. It works with both APK and AAB files.
Please note that in order to successfully use this Step, you must [upload your first APK or AAB file manually](https://support.google.com/googleplay/android-developer/answer/9859152?hl=en&visit_id=637407764704794872-3953166533&rd=1), using Google's own web interface!
Once you uploaded one APK or AAB of your app to Google Play manually, you can use our Step for all subsequent versions.
### Configuring the Step
The Step uses Google's API so before attempting to use the Step, you need to [Set up Google API access](https://devcenter.bitrise.io/deploy/android-deploy/deploying-android-apps/#setting-up-google-play-api-access). This includes:
- [Linking your Google Developer Console to an API project](https://developers.google.com/android-publisher/getting_started#linking_your_api_project).
- [Setting up API access using a service account](https://developers.google.com/android-publisher/getting_started#using_a_service_account).
- Granting the necessary access rights to the service account.
- Upload the service account JSON key to Bitrise and store it in a [Secret Env Var](https://devcenter.bitrise.io/builds/env-vars-secret-env-vars/).
Due to the way the Google Play Publisher API works, you have to grant at least the following permissions to that service account:
- Edit store listing, pricing & distribution
- Manage Production APKs
- Manage Alpha & Beta APKs
- Manage Alpha & Beta users
Read the full process in our [Deploying Android apps guide](https://devcenter.bitrise.io/deploy/android-deploy/deploying-android-apps/).
To deploy your app with the Step:
1. In the **Service Account JSON key file path**, add the Secret that stores your service account JSON key.
1. In the **App file path** input, set the path to your APK and/or AAB files. You can add multiple paths here, separated with a newline.
In most cases, the default values work well unless you changed the output variable of the Step that build your APK or AAB.
1. In the **Package name** input, set the package name of your app.
1. In the **Track** input, add the track to which you want to assign the app. This can be any of the built-in tracks or a custom track of your own.
### Troubleshooting
If the Step fails, check the following:
- If it's an authentication error, check that your Secret points to the correct file (and that a file is uploaded at all).
- Make sure your service account has the necessary access rights.
- Check that there's no typo in the package name and that you selected an existing track for the app.
### Useful links
- [Google Play Developer API - Getting Started](https://developers.google.com/android-publisher/getting_started)
- [Deploying Android apps](https://devcenter.bitrise.io/deploy/android-deploy/deploying-android-apps/)
### Related Steps
- [TestFairy Deploy Android](https://www.bitrise.io/integrations/steps/testfairy-deploy-android)
- [AppCenter Android Deploy](https://www.bitrise.io/integrations/steps/appcenter-deploy-android)
- [Appetize.io Deploy](https://www.bitrise.io/integrations/steps/appetize-deploy)
- [Android Sign](https://www.bitrise.io/integrations/steps/sign-apk)
website: https://github.com/bitrise-io/steps-google-play-deploy
source_code_url: https://github.com/bitrise-io/steps-google-play-deploy
support_url: https://github.com/bitrise-io/steps-google-play-deploy/issues
project_type_tags:
- android
- cordova
- ionic
- react-native
- flutter
type_tags:
- deploy
is_requires_admin_user: false
is_always_run: false
is_skippable: false
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-google-play-deploy
inputs:
- service_account_json_key_path:
opts:
title: Service Account JSON key file path
description: |-
Path to the service account's JSON key file. It must be a Secret Environment Variable, pointing to either a file uploaded to Bitrise or to a remote download location.
is_required: true
is_sensitive: true
- package_name:
opts:
title: Package name
description: |-
Package name of the app.
is_required: true
- app_path: $BITRISE_APK_PATH\n$BITRISE_AAB_PATH
opts:
title: App file path
description: |-
Path to the app bundle file(s) or APK file(s) to deploy.
In the case of [multiple artifacts](https://developer.android.com/google/play/publishing/multiple-apks.html) deploy, you can specify multiple APKs and AABs as a newline (`\n`) or pipe (`|`) separated list.
is_required: true
- expansionfile_path: ""
opts:
title: Expansion file Path
description: |-
Path to the [expansion file](https://developer.android.com/google/play/expansion-files).
Leave empty or provide exactly the same number of paths as in app_path, separated by `|` character and start each path with the expansion file's type
separated by a `:`. (main, patch)
Format examples:
- `main:/path/to/my/app.obb`
- `patch:/path/to/my/app1.obb|main:/path/to/my/app2.obb|main:/path/to/my/app3.obb`
- track: alpha
opts:
title: Track
summary: The track in which you want to assign the uploaded app.
description: |-
The track to which you want to assign the uploaded app.
Can be one of the built-in tracks (internal, alpha, beta, production), or a custom track name you added in Google Play Developer Console.
is_required: true
- user_fraction:
opts:
title: User Fraction
description: |-
Portion of the users who should get the staged version of the app. Accepts values between 0.0 and 1.0 (exclusive-exclusive).
Only applies if `Status` is `inProgress` or `halted`.
To release to all users, this input should not be defined (or should be blank).
is_required: false
- status:
opts:
title: Status
description: |-
The status of a release.
For more information see the [API reference](https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks#Status).
is_required: false
- release_name:
opts:
title: Name of the release
description: |-
The name of the release. By default Play Store generates the name from the APK's `versionName` value.
is_required: false
- update_priority: 0
opts:
title: Update Priority
description: |-
This allows your app to decide how strongly to recommend an update to the user.
Accepts values between 0 and 5 with 0 being the lowest priority and 5 being the highest priority.
By default this value is 0.
For more information see here: https://developer.android.com/guide/playcore/in-app-updates#check-priority.
is_required: false
- whatsnews_dir:
opts:
title: Directory of localized what's new files
description: |-
Use this input to specify localized 'what's new' files directory.
This directory should contain 'whatsnew' files postfixed with the locale.
what's new file name pattern: `whatsnew-LOCALE`
Example:
```
+ - [PATH/TO/WHATSNEW]
|
+ - whatsnew-en-US
|
+ - whatsnew-de-DE
```
Format examples:
- "./" # what's new files are in the repo root directory
- "./whatsnew" # what's new files are in the whatsnew directory
- mapping_file: $BITRISE_MAPPING_PATH
opts:
title: Mapping txt file path
description: |-
The `mapping.txt` file provides a translation between the original and obfuscated class, method, and field names.
Uploading a mapping file is not required when deploying an AAB as the app bundle contains the mapping file itself.
In case of deploying [multiple artifacts](https://developer.android.com/google/play/publishing/multiple-apks.html), you can specify multiple mapping.txt files as a newline (`\n`) or pipe (`|`) separated list. The order of mapping files should match the list of APK or AAB files in the `app_path` input.
- retry_without_sending_to_review: "false"
opts:
title: Retry changes without sending to review
description: |-
If set to `true` and the initial change request fails, the changes will not be reviewed until they are manually sent
for review from the Google Play Console UI. If set to `false`, the step fails if the changes can't be automatically
sent to review.
is_required: true
value_options:
- "true"
- "false"
- ack_bundle_installation_warning: "false"
opts:
title: Acknowledge Bundle Installation Warning
description: |-
Must be set to `true` if the App Bundle installation may trigger a warning on user devices
(for example, if installation size may be over a threshold, typically 100 MB).
is_required: true
value_options:
- "true"
- "false"
- dry_run: "false"
opts:
title: Dry Run
description: |-
If set to `true` then the changes will not be committed to create a real release in the Play
Console. Use this flag to validate your configuration without triggering a new review.
is_required: false
value_options:
- "true"
- "false"
- verbose_log: "false"
opts:
title: Enable verbose logging
summary: If this input is set, the Step will print additional logs for debugging.
description: If this input is set, the Step will print additional logs for debugging.
is_required: true
value_options:
- "true"
- "false"
outputs:
- FAILURE_REASON:
opts:
title: Error upload reason
summary: Response given from Google about why aab/apk was not uploaded