@smbcloud / smbcloud-ascapi Mirror · read-only / commits / eb3643e
Fork 0

Read-only mirror of github.com/smbcloudXYZ/smbcloud-ascapi.

Mirrored from https://github.com/smbcloudXYZ/smbcloud-ascapi.git

Synced Nov 25, 09:15 UTC

Add admob, amazon and iap to the release and CI workflows

The crates.io release workflow, the CI solo-build check and the docs had drifted from the workspace: admob, amazon and iap exist as crates but were missing from the verify loops, the publish list and the architecture tables. - release-crates.yml: add admob and amazon to the solo-build loop and to the crates=(...) publish list, in dependency order before frontend/mcp/cli. - ci.yml: replace the hand-maintained solo-build list with a loop over all eleven lower crates, so a new crate can't be silently skipped again. - SKILL.md: 11 -> 14 per-crate tags (+vX.Y.Z = 15); record that iap, admob and amazon are still unpublished and must be bootstrapped by hand before the next tag, with a curl check to re-verify that before each release. - architecture.md and AGENTS.md: add the missing crate rows, and correct the layering note - the store backends (play, appgallery, msstore, admob, amazon) do not depend on core and each defines its own client, unlike the Apple-domain crates that extend core::Client as extension traits. Co-Authored-By: siGit Code v1.7.10-acp <noreply@sigit.si>

Seto Elkahfi committed Nov 17, 2026 at 22:28 UTC eb3643e450cda1b938d52db20e80318bba63adec
5 files changed +64 -27
.agents/AGENTS.md
+9 -3
@@ -165,7 +165,10 @@ cargo fmt --all -- --check
165 cargo clippy --workspace --all-targets --locked -- -D warnings
166 cargo test --workspace --locked
167 RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace --locked
168 -cargo check -p smbcloud-ascapi-core --locked # also -aso, -play, -admob, -msstore, -signing: each lower crate must build alone
168 +cargo check -p smbcloud-ascapi-core --locked # each lower crate must build alone:
169 +for c in core aso pricing iap signing reports play appgallery msstore admob amazon; do
170 + cargo check -p "smbcloud-ascapi-$c" --locked
171 +done
172 ```
173
174 Single test: `cargo test -p smbcloud-ascapi-aso build::tests::<name>`.
@@ -198,8 +201,11 @@ merged since.
201 ## Architecture notes
202
203 - Layering is `core` → `aso`/`pricing`/`iap`/`signing`/`reports` → `frontend` →
201 - `mcp` / `cli`. Don't add a dependency that points up or sideways; CI checks
202 - the lower crates build alone.
204 + `mcp` / `cli`. The non-Apple store backends `play`, `appgallery`, `msstore`,
205 + `admob` and `amazon` are siblings of `core`'s dependents: they use their own
206 + auth and error envelopes, so they don't depend on `core` either, and they
207 + feed `frontend` and `cli` directly. Don't add a dependency that points up or
208 + sideways; CI checks the lower crates build alone.
209 - The MCP tool set is declared by the `ascapi_mcp_tools!` macro
210 (`crates/mcp/src/lib.rs`), which takes every tool name as a literal;
211 `crates/mcp/src/server.rs` supplies them. Adding a tool means touching the
.agents/skills/ascapi-release/SKILL.md
+32 -9
@@ -88,8 +88,8 @@ cargo workspaces version custom 0.3.0 \
88 - `--force '*'` bumps every crate to the shared version even if cargo-workspaces
89 thinks some are unchanged (single-version workspace).
90
91 -This creates the `Release X.Y.Z` commit, the `vX.Y.Z` tag, and **11 per-crate
92 -tags** `smbcloud-ascapi-{appgallery,aso,cli,core,frontend,mcp,msstore,play,pricing,reports,signing}@X.Y.Z`,
91 +This creates the `Release X.Y.Z` commit, the `vX.Y.Z` tag, and **14 per-crate
92 +tags** `smbcloud-ascapi-{admob,amazon,appgallery,aso,cli,core,frontend,iap,mcp,msstore,play,pricing,reports,signing}@X.Y.Z`,
93 all pointing at the Release commit.
94
95 ## Step 3 — sync `server.json`
@@ -109,9 +109,11 @@ git add server.json
109 git commit --amend --no-edit
110 NEW=$(git rev-parse HEAD)
111 for t in \
112 + smbcloud-ascapi-admob@X.Y.Z smbcloud-ascapi-amazon@X.Y.Z \
113 smbcloud-ascapi-appgallery@X.Y.Z smbcloud-ascapi-aso@X.Y.Z \
114 smbcloud-ascapi-cli@X.Y.Z \
115 smbcloud-ascapi-core@X.Y.Z smbcloud-ascapi-frontend@X.Y.Z \
116 + smbcloud-ascapi-iap@X.Y.Z \
117 smbcloud-ascapi-mcp@X.Y.Z smbcloud-ascapi-msstore@X.Y.Z \
118 smbcloud-ascapi-play@X.Y.Z \
119 smbcloud-ascapi-pricing@X.Y.Z \
@@ -126,7 +128,7 @@ changes the hash again. After all amends settle, re-point the tags to the final
128 HEAD and verify they all land on one commit:
129
130 ```sh
129 -git tag --points-at HEAD # must list all 12 tags
131 +git tag --points-at HEAD # must list all 15 tags (14 per-crate + vX.Y.Z)
132 git log -1 --format='sig=%G? key=%GK' # must be sig=G key=2B76DF0F04014E36
133 ```
134
@@ -158,11 +160,12 @@ they don't start extra runs. Three jobs run in order:
160
161 1. **`verify`** fails the run if the tag differs from the workspace version in
162 `Cargo.toml`, then runs `cargo fmt --check`, clippy with `-D warnings`,
161 - `cargo test --workspace --locked`, and `cargo check` on `core`, `aso`,
162 - `pricing`, `signing`, `reports`, `play`, `appgallery` and `msstore` on their own.
163 + `cargo test --workspace --locked`, and `cargo check` on every lower crate —
164 + `core`, `aso`, `pricing`, `iap`, `signing`, `reports`, `play`, `appgallery`,
165 + `msstore`, `admob`, `amazon` — on its own.
166 2. **`publish`** (environment `crates-io`) publishes `core`, `aso`, `pricing`,
164 - `signing`, `reports`, `play`, `appgallery`, `msstore`, `frontend`, `mcp`, `cli`, in that
165 - order, with
167 + `iap`, `signing`, `reports`, `play`, `appgallery`, `msstore`, `admob`,
168 + `amazon`, `frontend`, `mcp`, `cli`, in that order, with
169 `cargo publish -p <crate> --locked`. Authentication is crates.io trusted
170 publishing: the job exchanges its GitHub OIDC token through
171 `rust-lang/crates-io-auth-action`, so there is no registry token secret.
@@ -184,7 +187,7 @@ gh run watch <run-id>
187
188 ### One-time setup it depends on
189
187 -- Each of the eleven crates has a trusted publisher on crates.io for repository
190 +- Each published crate has a trusted publisher on crates.io for repository
191 `smbcloudXYZ/smbcloud-ascapi` and workflow `release-crates.yml`. If a crate
192 is missing one, `cargo publish` fails for that crate and the later crates are
193 not published. Add the publisher and re-run.
@@ -192,7 +195,27 @@ gh run watch <run-id>
195 crates.io, so its first version goes up by hand with a token
196 (`cargo publish -p <crate>`), then the publisher is added. `play` went
197 through this at 0.3.0. Add any new crate to the `crates=(...)` list in
195 - `release-crates.yml` in dependency order before tagging.
198 + `release-crates.yml` **and** to the solo-build loop in that workflow's
199 + `verify` job and in `ci.yml`, all in dependency order, before tagging.
200 +- **Outstanding at the time of writing:** `iap`, `admob` and `amazon` are in
201 + the `crates=(...)` list but have never been published, so the next release
202 + has to bootstrap all three by hand. Do it between the version bump (step 2)
203 + and the tag push (step 4), while the workspace is already at `X.Y.Z`:
204 + `cargo publish -p smbcloud-ascapi-{iap,admob,amazon}` with a token, then add
205 + a trusted publisher for each. None of the three blocks the others — `iap`
206 + depends only on `core`, and `admob` and `amazon` on nothing in the workspace
207 + — so publish them in any order. If you skip this, the run dies at `frontend`
208 + (which depends on `admob` and `amazon`) or at `cli` (which depends on `iap`),
209 + leaving every later crate unpublished. Re-check before each release with:
210 +
211 + ```sh
212 + for c in core aso pricing iap signing reports play appgallery msstore admob \
213 + amazon frontend mcp cli; do
214 + curl -sS -o /dev/null -w "%{http_code} smbcloud-ascapi-$c\n" \
215 + -H 'User-Agent: smbcloudXYZ/smbcloud-ascapi release-check' \
216 + "https://crates.io/api/v1/crates/smbcloud-ascapi-$c"
217 + done # 404 = still unpublished, needs the manual bootstrap
218 + ```
219 - If a trusted publisher names an environment, it must be `crates-io`, which
220 is the environment the `publish` job runs in.
221
.github/workflows/ci.yml
+3 -6
@@ -69,12 +69,9 @@ jobs:
69 # core with the MCP server's dependencies already in the graph and
70 # tell us nothing.
71 run: |
72 - cargo check --package smbcloud-ascapi-core --locked
73 - cargo check --package smbcloud-ascapi-aso --locked
74 - cargo check --package smbcloud-ascapi-signing --locked
75 - cargo check --package smbcloud-ascapi-play --locked
76 - cargo check --package smbcloud-ascapi-appgallery --locked
77 - cargo check --package smbcloud-ascapi-msstore --locked
72 + for crate in core aso pricing iap signing reports play appgallery msstore admob amazon; do
73 + cargo check --package "smbcloud-ascapi-${crate}" --locked
74 + done
75
76 - name: Build docs
77 # Intra-doc links are load-bearing in this crate: the certificate
.github/workflows/release-crates.yml
+6 -4
@@ -92,7 +92,7 @@ jobs:
92 - name: Check the lower crates build alone
93 shell: bash
94 run: |
95 - for crate in core aso pricing iap signing reports play appgallery msstore; do
95 + for crate in core aso pricing iap signing reports play appgallery msstore admob amazon; do
96 cargo check -p "smbcloud-ascapi-${crate}" --locked
97 done
98
@@ -135,9 +135,9 @@ jobs:
135
136 # Dependency order: a crate can only be published once everything it
137 # depends on is on crates.io. core first, then the domain crates
138 - # that only depend on core, then play, appgallery and msstore (which depend on no other
139 - # workspace crate),
140 - # then frontend, mcp, and the CLI last.
138 + # that only depend on core, then play, appgallery, msstore, admob
139 + # and amazon (which depend on no other workspace crate), then
140 + # frontend, mcp, and the CLI last.
141 crates=(
142 core
143 aso
@@ -148,6 +148,8 @@ jobs:
148 play
149 appgallery
150 msstore
151 + admob
152 + amazon
153 frontend
154 mcp
155 cli
docs/architecture.md
+14 -5
@@ -1,6 +1,6 @@
1 # Architecture
2
3 -Nine crates, split by domain and layered so neither front end can drift
3 +Fourteen crates, split by domain and layered so neither front end can drift
4 from the other:
5
6 | Crate | What it is |
@@ -10,20 +10,29 @@ from the other:
10 | `smbcloud-ascapi-amazon` | Amazon Appstore App Submission API (Fire tablets, Fire TV): Login with Amazon client-credentials auth, the open edit, APK upload and replace (ETag), device targeting, validate; no commit, independent of `core` |
11 | `smbcloud-ascapi-appgallery` | Huawei AppGallery Connect Publishing API (Android): app info and listings, file and package upload, submit, phased release, release time, GMS flag, package list and status; Service Account auth (PS256 JWT), independent of `core` |
12 | `smbcloud-ascapi-msstore` | Microsoft Store submission API v1.0: listing text on an MSIX app's pending submission; Entra client-credentials auth, independent of `core` |
13 +| `smbcloud-ascapi-admob` | Google AdMob Management API (v1beta): apps and ad units; user OAuth (installed-app PKCE flow, cached refresh token), independent of `core` |
14 | `smbcloud-ascapi-aso` | App Metadata: apps, app infos, versions, builds, pre-release versions, review submissions, bundle IDs, localizations, screenshots |
15 | `smbcloud-ascapi-pricing` | Pricing: app price schedules, and the per-territory prices joined with their price points and currencies |
16 +| `smbcloud-ascapi-iap` | In-app purchases (v2 `inAppPurchases`): one-time products, localizations, manual price schedules, territories, review screenshots and promotional images; subscriptions are out of scope |
17 | `smbcloud-ascapi-signing` | Code signing: certificates and provisioning profiles, plus local RSA key pair and CSR generation |
18 | `smbcloud-ascapi-reports` | Sales reports: account-level sales data, as Apple's gzip-compressed TSV |
19 | `smbcloud-ascapi-frontend` | Operations both surfaces share, so the CLI and the MCP server agree by construction, plus the CLI's `xcrun altool` upload |
20 | `smbcloud-ascapi-mcp` | The MCP contract and stdio server |
21 | `smbcloud-ascapi-cli` | The `asc` binary: clap command tree, plus `--mcp` |
22
21 -`aso`, `play`, `appgallery`, `amazon`, `msstore`, `pricing`, `signing` and `reports` know nothing about each other, and neither knows
22 -anything about the front ends. Each adds its calls to
23 -`smbcloud_ascapi_core::Client` as **extension traits**, since Rust only
24 -allows inherent impls in the crate that defines a type:
23 +`aso`, `play`, `appgallery`, `amazon`, `msstore`, `admob`, `pricing`, `iap`,
24 +`signing` and `reports` know nothing about each other, and none of them knows
25 +anything about the front ends.
26 +
27 +`aso`, `pricing`, `iap`, `signing` and `reports` are the Apple-domain crates:
28 +each adds its calls to `smbcloud_ascapi_core::Client` as **extension traits**,
29 +since Rust only allows inherent impls in the crate that defines a type:
30
31 ```rust
32 use smbcloud_ascapi_core::{ApiKey, Client};
33 use smbcloud_ascapi_aso::prelude::*; // or pricing::prelude, signing::prelude
34 ```
35 +
36 +The store backends `play`, `appgallery`, `amazon`, `msstore` and `admob` are
37 +different: they authenticate their own way and have their own error envelopes,
38 +so they do not depend on `core` and each defines its own client.