Skip to content

ci: gated store-publish workflow — CWS + AMO listed (V2-689)#11

Merged
Nic-dorman merged 1 commit into
mainfrom
ci/store-publish
Jul 21, 2026
Merged

ci: gated store-publish workflow — CWS + AMO listed (V2-689)#11
Nic-dorman merged 1 commit into
mainfrom
ci/store-publish

Conversation

@Nic-dorman

Copy link
Copy Markdown
Contributor

Implements V2-689 — the second stage of store automation: manual, gated publishing of a tagged release to the public Chrome Web Store and Firefox AMO listings. Consumes what V2-688 (#10) produces. Standalone (off main).

How it works

publish.yml is workflow_dispatch-only — it never runs on tags or merges, so publishing is always a deliberate button press. It runs in a store-publish GitHub Environment, so you can add a required reviewer to approve every publish, and store secrets stay off fork-PR runs.

Actions → Publish to stores → Run workflow, choose:

  • tag — the release to publish (must exist)
  • storesboth / chrome / firefox
  • chrome_targettrustedTesters (safe default) → default (public)

It checks out the tag, rebuilds (reproducible → identical to the released artifact), and publishes to the selected stores; it fails clearly if a selected store's secrets aren't set.

Chrome without a third-party action

scripts/cws-publish.mjs does the CWS publish itself — OAuth refresh → upload → publish via Node's fetch, no npm dep and no marketplace action, so the store credentials are never handed to code we don't control. Supports publishTarget (trusted testers vs public). Firefox uses web-ext sign --channel=listed.

Honest caveats (in PUBLISHING.md)

  • Listings must be created manually first — this automates version uploads, not the initial listing metadata/screenshots.
  • Neither store bypasses review — the API submits; Google/Mozilla still review.
  • Versions are one-shot — bump + re-tag to re-publish.
  • AMO source submission for minified add-ons may need the source zip attached (dashboard/API) — flagged to verify on first listed submission.

Verification

YAML validated; cws-publish.mjs passes node --check and its guard paths (missing creds / bad target / missing source) all exit cleanly with actionable errors — verified locally without any network call. The live publish path can't be exercised without real store credentials + existing listings, so this is ready to wire: add the store-publish secrets and dispatch with trustedTesters for the first safe run.

Secrets to add (store-publish environment)

CWS_CLIENT_ID, CWS_CLIENT_SECRET, CWS_REFRESH_TOKEN, CWS_EXTENSION_ID, WEB_EXT_API_KEY, WEB_EXT_API_SECRET.

🤖 Generated with Claude Code

Manual, gated publishing of a tagged release to the public store listings.

- publish.yml: workflow_dispatch only, in a `store-publish` GitHub Environment so
  a required reviewer can approve every publish; never runs on tags/merges.
  Inputs: tag, stores (both/chrome/firefox), chrome_target (trustedTesters →
  default). Checks out the tag, rebuilds (reproducible → equals the released
  artifact), then publishes to the selected stores; fails clearly if a selected
  store's secrets are missing.
- scripts/cws-publish.mjs: self-contained CWS publish (OAuth refresh → upload →
  publish) using Node's fetch — no third-party action receives the store
  credentials. Supports publishTarget (trustedTesters/default).
- Firefox AMO: `web-ext sign --channel=listed`.
- PUBLISHING.md: one-time listing creation, credential setup (CWS OAuth +
  refresh token, AMO JWT) on the store-publish environment, and the caveats
  (review queues, one-shot versions, AMO source submission, trusted-testers-first).

Consumes the artifacts produced by V2-688. Branched off main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Nic-dorman
Nic-dorman merged commit cb8f385 into main Jul 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant