IHOR.DEVKNOWLEDGE_BASE
MENU

~/blog / Publishing / automating-chrome-extension-releases.md

// guide · 4 min read

Automating Chrome Extension Releases

Automate extension builds and artifact evidence before Store upload; use current API status handling, protected credentials, and explicit publication-state verification.

Quick answer

Automate the deterministic release path: clean build, validation, package creation, checksum, and retained artifact. Then add authenticated Store upload and status handling only after the artifact is reviewable. Store upload, review submission, and public publication remain separate outcomes even when an API performs the requests.

Use the current Chrome Web Store API documentation rather than an old V1 snippet. The official API overview identifies V2 as current and supports service accounts; the usage guide also documents OAuth setup. Choose the account model deliberately and keep credentials out of the package and public logs.

Practical implementation steps

  1. Make the build command reproducible and fail on validation errors. Inspect the output manifest and remove stale output before packaging. A CI success that never inspects the installed entry points is incomplete.
  2. Create one ZIP from the reviewed directory and record its version, commit, and SHA-256. Upload that retained artifact rather than rebuilding after approval.
  3. Separate a read-only status query from upload and publication mutations. A successful HTTP response is not enough: inspect the API’s upload and review fields. Poll only with bounded backoff and stop on terminal failure.
  4. Protect publisher credentials in the CI secret mechanism or supported service-account setup. Restrict release execution to trusted branches/environments; untrusted pull-request code must not gain publishing credentials. Avoid verbose commands that expose tokens.
  5. Handle an interrupted workflow by fetching item status before repeating a mutation. Blind retries can upload an unintended artifact or submit a package whose current state you have not inspected.
  6. Verify public availability separately after the review succeeds. LocaleStress’s import record initially had no public item payload and later verified an installable 0.3.0 listing; that demonstrates why dashboard/API progress and public installability need distinct records.

Automation should preserve reviewer instructions, listing accuracy, and privacy review as explicit release inputs. An API cannot infer truthful permissions explanations from a manifest alone.

Implementation example

A local artifact command can be automated before connecting publishing credentials. This POSIX-shell example assumes dist is the completed reviewed package and creates an archive outside it.

set -eu
[ -f dist/manifest.json ]
rm -f extension-release.zip
(cd dist && zip -r ../extension-release.zip .)
shasum -a 256 extension-release.zip > extension-release.sha256
unzip -l extension-release.zip

The commands create and inspect an artifact; they do not upload or publish. A connected release job should persist both files, compare the manifest version with the intended release, and use the current API’s status contract. Keep the release secret in an environment variable or supported credential mechanism rather than interpolating it into a printed command.

Tradeoffs and alternatives

A manual dashboard submission is reasonable for infrequent releases. Automation pays off when repeated packaging or status handling causes mistakes, but it also creates credential and retry responsibilities. Start with artifact automation and add mutations only when their recovery behavior is clear.

Common mistakes

  • Rebuilding a different ZIP after its review.
  • Treating upload success as public availability.
  • Copying archived V1 requests without checking current endpoints.
  • Logging access tokens or giving untrusted jobs release credentials.

Production checklist

  • One artifact identity follows the whole release.
  • Credentials are restricted and absent from logs/artifacts.
  • API state is read before retrying mutations.
  • Review failure and public availability have separate states.
  • Manual semantic review remains an explicit release input.

FAQ

Does the API skip Store review?

No. The usage guide states that a new version still needs review.

Can a workflow infer a privacy declaration?

It can check required fields, but a person must verify that the declared data behavior matches the package.

What is the safest useful first automation?

A validated ZIP with a recorded checksum and a readable release report. Connect upload only after that result is reproducible.

Primary sources

Ihor Kharchyshyn

Independent full-stack product engineer writing source-backed implementation guides for browser extensions and modern web products.

Need this implemented in a real product?

Browser tools with a clear purpose, focused permissions, and a maintainable Manifest V3 architecture.