fastlane-plugin-rustore_publish 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd132c23b34f14d456105b21b740e4ceca699c8b7fd713291dfe16e78b7652dc
|
|
4
|
+
data.tar.gz: 2ff78c0bec58b88fdf8213cfa335db28d7ab8518170b593c83d9ca59eacf8eaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80d19c4feb36cda3a7885779e41052852e6d8fd0404832ebabce322ba436bb94f465061f7008f0128a0200e64f7e615bfc6a97e393249a41b2857ffbdf422953
|
|
7
|
+
data.tar.gz: bf4d2808075c2be01281891769746700e3a314f397b4b3c60d2853aea5f7896a4938fc8d3e2f69b0e073024201aa80b8775d94e28fe7e1253aba801591018e3e
|
data/README.md
CHANGED
|
@@ -36,6 +36,8 @@ The key comes from RuStore Console → Company → API RuStore, see [Setup](#set
|
|
|
36
36
|
|
|
37
37
|
Плагин fastlane для публикации Android-приложений в RuStore из CI: создаёт черновик, загружает AAB и HMS APK, отправляет на модерацию. Работает через новый домен `public-api-m.rustore.ru`, на который RuStore переводит Public API; корневой сертификат Минцифры уже внутри плагина, ставить его на раннер не нужно. В логах CI видно, сколько шла отправка файла и сколько RuStore его проверял, а ошибки (таймаут, TLS, 504, новые чувствительные разрешения) приходят с подсказкой, что делать.
|
|
38
38
|
|
|
39
|
+
Чтобы на модерацию отправлял человек, а не CI, есть `submit_for_review: false` (или `RUSTORE_SUBMIT_FOR_REVIEW=false`): плагин создаёт черновик, загружает сборки, задаёт процент раскатки и тип публикации и останавливается до модерации — отправить черновик можно кнопкой в RuStore Console.
|
|
40
|
+
|
|
39
41
|
Для пробного прогона без выкладки есть `rustore_check`: получает токен и показывает последние версии приложения, ничего не загружая; 404 на списке версий считается успехом (ключ рабочий, версий через API пока нет).
|
|
40
42
|
|
|
41
43
|
Установка — `fastlane add_plugin rustore_publish`, пример — в [Quick start](#quick-start) выше. Вопросы и баги — в [Issues](https://github.com/gorban-dev/rustore-fastlane-plugin/issues), можно на русском.
|
|
@@ -43,7 +45,7 @@ The key comes from RuStore Console → Company → API RuStore, see [Setup](#set
|
|
|
43
45
|
## Features
|
|
44
46
|
|
|
45
47
|
- Upload **AAB** (Google/GMS, main artifact) and **APK** (Huawei/HMS, secondary) in a single version
|
|
46
|
-
- Full publish workflow: authenticate → create draft (with publication settings) → upload files → submit for moderation
|
|
48
|
+
- Full publish workflow: authenticate → create draft (with publication settings) → upload files → submit for moderation (or leave the draft for RuStore Console with `submit_for_review: false`)
|
|
47
49
|
- The pipeline always finishes immediately after submission — no waiting for moderation
|
|
48
50
|
- **GitLab CI** collapsible log sections (foldable blocks in Pipeline UI)
|
|
49
51
|
- Staged rollout support (`rollout_percentage`)
|
|
@@ -111,8 +113,9 @@ You will get two values:
|
|
|
111
113
|
| `moder_info` | `RUSTORE_MODER_INFO` | no | — | Notes for the RuStore moderator, e.g. test credentials (max 180 chars) |
|
|
112
114
|
| `publish_type` | `RUSTORE_PUBLISH_TYPE` | no | `INSTANTLY` | `INSTANTLY` / `MANUAL` / `DELAYED` |
|
|
113
115
|
| `release_date` | `RUSTORE_RELEASE_DATE` | no | — | ISO 8601 datetime, only for `DELAYED` |
|
|
114
|
-
| `rollout_percentage` | `RUSTORE_ROLLOUT_PERCENTAGE` | no | — | Staged rollout: allowed values `5, 10, 25, 50, 75, 100` |
|
|
116
|
+
| `rollout_percentage` | `RUSTORE_ROLLOUT_PERCENTAGE` | no | — | Staged rollout: allowed values `5, 10, 25, 50, 75, 100`; only with `INSTANTLY` or `MANUAL` |
|
|
115
117
|
| `update_priority` | `RUSTORE_UPDATE_PRIORITY` | no | `0` | In-app update priority sent with the moderation request, `0`–`5` |
|
|
118
|
+
| `submit_for_review` | `RUSTORE_SUBMIT_FOR_REVIEW` | no | `true` | `false` — stop before moderation and leave the draft to be submitted from RuStore Console; `update_priority` is then not sent |
|
|
116
119
|
| `upload_timeout` | `RUSTORE_UPLOAD_TIMEOUT` | no | `900` | Seconds to wait for RuStore to answer an AAB/APK upload. RuStore checks the file (permissions, SDKs) before answering |
|
|
117
120
|
|
|
118
121
|
### Draft metadata (NEW — RuStore API v2)
|
|
@@ -173,10 +176,10 @@ rustore_upload(
|
|
|
173
176
|
| `publish_type` | Behaviour |
|
|
174
177
|
|---|---|
|
|
175
178
|
| `INSTANTLY` | RuStore auto-publishes after moderation passes (default) |
|
|
176
|
-
| `DELAYED` | Scheduled publication via `release_date` in ISO 8601 |
|
|
179
|
+
| `DELAYED` | Scheduled publication via `release_date` in ISO 8601; no `rollout_percentage` |
|
|
177
180
|
| `MANUAL` | Moderation runs normally; publish manually from RuStore Console |
|
|
178
181
|
|
|
179
|
-
The pipeline finishes immediately after submitting for moderation for all three types.
|
|
182
|
+
The pipeline finishes immediately after submitting for moderation for all three types. With `submit_for_review: false` it does not submit at all: see [Upload without submitting](#upload-without-submitting-for-moderation).
|
|
180
183
|
|
|
181
184
|
---
|
|
182
185
|
|
|
@@ -232,6 +235,29 @@ lane :deploy_rustore_scheduled do
|
|
|
232
235
|
end
|
|
233
236
|
```
|
|
234
237
|
|
|
238
|
+
### Upload without submitting for moderation
|
|
239
|
+
|
|
240
|
+
CI creates the draft, uploads the builds and sets rollout and publish type; a person sends it for moderation from RuStore Console.
|
|
241
|
+
|
|
242
|
+
```ruby
|
|
243
|
+
lane :upload_rustore_draft do
|
|
244
|
+
rustore_upload(
|
|
245
|
+
package_name: "com.example.app",
|
|
246
|
+
key_id: ENV["RUSTORE_KEY_ID"],
|
|
247
|
+
private_key: ENV["RUSTORE_PRIVATE_KEY"],
|
|
248
|
+
aab_path: "app/build/outputs/bundle/gmsRelease/app-gms-release.aab",
|
|
249
|
+
hms_apk_path: "app/build/outputs/apk/hmsRelease/app-hms-release.apk",
|
|
250
|
+
publish_type: "MANUAL",
|
|
251
|
+
rollout_percentage: 10,
|
|
252
|
+
submit_for_review: false # step 5 is skipped, no commit request
|
|
253
|
+
)
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
- `update_priority` is sent only with the moderation request, so here it is ignored with a warning: set the priority in the Console when submitting.
|
|
258
|
+
- The next run deletes this draft if it is still not submitted (step 2), as it does with any unsubmitted draft: the new build replaces the old one.
|
|
259
|
+
- `publish_type: MANUAL` alone is a different thing: the build still goes to moderation, only the publication after it is manual.
|
|
260
|
+
|
|
235
261
|
### Combined with Gradle build
|
|
236
262
|
|
|
237
263
|
```ruby
|
|
@@ -12,6 +12,12 @@ module Fastlane
|
|
|
12
12
|
def self.run(params)
|
|
13
13
|
logger = RustorePublish::RustoreLogger.new(total_steps: TOTAL_STEPS)
|
|
14
14
|
|
|
15
|
+
# RuStore allows partial publication only with INSTANTLY or MANUAL;
|
|
16
|
+
# with DELAYED the draft request fails, so stop before any request.
|
|
17
|
+
if params[:rollout_percentage] && params[:publish_type] == "DELAYED"
|
|
18
|
+
UI.user_error!("rollout_percentage is not allowed with publish_type DELAYED: RuStore supports partial publication only with INSTANTLY or MANUAL. Remove rollout_percentage or change publish_type")
|
|
19
|
+
end
|
|
20
|
+
|
|
15
21
|
# ── Step 1: Authentication ─────────────────────────────────────────────
|
|
16
22
|
logger.step(1, "Authentication")
|
|
17
23
|
|
|
@@ -43,6 +49,7 @@ module Fastlane
|
|
|
43
49
|
publish_type = params[:publish_type]
|
|
44
50
|
release_date = params[:release_date]
|
|
45
51
|
rollout_percentage = params[:rollout_percentage]
|
|
52
|
+
submit_for_review = params[:submit_for_review]
|
|
46
53
|
|
|
47
54
|
if release_date && publish_type != "DELAYED"
|
|
48
55
|
logger.warning("release_date is set but publish_type is '#{publish_type}' — only used with DELAYED")
|
|
@@ -79,6 +86,7 @@ module Fastlane
|
|
|
79
86
|
["Rollout", rollout_percentage ? "#{rollout_percentage}%" : "100%"],
|
|
80
87
|
["Release date", release_date || "(not set)"],
|
|
81
88
|
["Update priority", params[:update_priority]],
|
|
89
|
+
["Submit for review", submit_for_review ? "yes" : "no"],
|
|
82
90
|
["Upload timeout", "#{params[:upload_timeout]}s"]
|
|
83
91
|
])
|
|
84
92
|
|
|
@@ -156,6 +164,17 @@ module Fastlane
|
|
|
156
164
|
|
|
157
165
|
# ── Step 5: Submit for moderation ─────────────────────────────────────
|
|
158
166
|
logger.step(5, "Submitting for moderation")
|
|
167
|
+
|
|
168
|
+
unless submit_for_review
|
|
169
|
+
logger.info("Skipped — submit the draft for moderation from RuStore Console")
|
|
170
|
+
if params[:update_priority] != 0
|
|
171
|
+
logger.warning("update_priority=#{params[:update_priority]} is not sent: it goes only with the moderation request — set it in RuStore Console when submitting")
|
|
172
|
+
end
|
|
173
|
+
logger.finalize
|
|
174
|
+
UI.success("#{RustorePublish::RustoreLogger::PREFIX} All done! #{package_name} versionId=#{version_id} uploaded as a draft, not submitted for moderation.")
|
|
175
|
+
return
|
|
176
|
+
end
|
|
177
|
+
|
|
159
178
|
client.submit_for_review(package_name: package_name, version_id: version_id, update_priority: params[:update_priority])
|
|
160
179
|
|
|
161
180
|
case publish_type
|
|
@@ -239,7 +258,7 @@ module Fastlane
|
|
|
239
258
|
FastlaneCore::ConfigItem.new(
|
|
240
259
|
key: :rollout_percentage,
|
|
241
260
|
env_name: "RUSTORE_ROLLOUT_PERCENTAGE",
|
|
242
|
-
description: "Staged rollout: allowed values are 5, 10, 25, 50, 75, 100; omit for full rollout",
|
|
261
|
+
description: "Staged rollout: allowed values are 5, 10, 25, 50, 75, 100; omit for full rollout; not with DELAYED",
|
|
243
262
|
type: Integer,
|
|
244
263
|
optional: true,
|
|
245
264
|
verify_block: proc { |v|
|
|
@@ -255,6 +274,14 @@ module Fastlane
|
|
|
255
274
|
optional: true,
|
|
256
275
|
verify_block: proc { |v| UI.user_error!("update_priority must be between 0 and 5") unless (0..5).cover?(v) }
|
|
257
276
|
),
|
|
277
|
+
FastlaneCore::ConfigItem.new(
|
|
278
|
+
key: :submit_for_review,
|
|
279
|
+
env_name: "RUSTORE_SUBMIT_FOR_REVIEW",
|
|
280
|
+
description: "Send the draft for moderation (commit); false leaves it as a draft to submit from RuStore Console",
|
|
281
|
+
default_value: true,
|
|
282
|
+
type: Fastlane::Boolean,
|
|
283
|
+
optional: true
|
|
284
|
+
),
|
|
258
285
|
|
|
259
286
|
# ── Network ────────────────────────────────────────────────────────
|
|
260
287
|
FastlaneCore::ConfigItem.new(
|
|
@@ -407,6 +434,8 @@ module Fastlane
|
|
|
407
434
|
- APK (Huawei/HMS build) as a secondary artifact (servicesType=HMS)
|
|
408
435
|
|
|
409
436
|
The pipeline always finishes immediately after submitting for moderation.
|
|
437
|
+
With submit_for_review: false it stops before moderation and leaves the
|
|
438
|
+
draft (files, rollout, publish type) to be submitted from RuStore Console.
|
|
410
439
|
Publication behaviour is controlled by publish_type:
|
|
411
440
|
INSTANTLY — RuStore auto-publishes after moderation passes (default)
|
|
412
441
|
DELAYED — scheduled publication via release_date
|
|
@@ -452,6 +481,16 @@ module Fastlane
|
|
|
452
481
|
' aab_path: "...",',
|
|
453
482
|
' publish_type: "DELAYED",',
|
|
454
483
|
' release_date: "2025-03-01T10:00:00+03:00"',
|
|
484
|
+
')',
|
|
485
|
+
'',
|
|
486
|
+
'# Upload without submitting — a person sends the draft for moderation from RuStore Console',
|
|
487
|
+
'rustore_upload(',
|
|
488
|
+
' package_name: "com.example.app",',
|
|
489
|
+
' key_id: ENV["RUSTORE_KEY_ID"],',
|
|
490
|
+
' private_key: ENV["RUSTORE_PRIVATE_KEY"],',
|
|
491
|
+
' aab_path: "...",',
|
|
492
|
+
' rollout_percentage: 10,',
|
|
493
|
+
' submit_for_review: false',
|
|
455
494
|
')'
|
|
456
495
|
].join("\n")
|
|
457
496
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-rustore_publish
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Gorban
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-12-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fastlane
|