CI tool to easily publish browser extensions
CI tool to easily publish browser extensions
Publish Browser Extension
Publish an extension to all the extension stores in a single command!
Publish to the following stores:
Helper script to generate secrets and configure options
Upload sources ZIP to the Firefox Addon Store
[!IMPORTANT]
You are responsible for uploading and submitting an extension for the first time by hand.
publish-browser-extensiondoes not provide tools for creating a new extension.
npm i -D publish-browser-extension
pnpm i -D publish-browser-extension
bun i -D publish-browser-extensionTo get started, run the init command. It will walk you through generating all the necessary environment variables/CLI flags, saving them to a .env.submit file:
publish-extension initAll CLI flags can be passed as environment variables instead. For example, setting the
CHROME_CLIENT_IDenvironment variable is equivalent to passing--chrome-client-id. Just convert the flag to UPPER_SNAKE_CASE.
Then, just run the submit command, passing the ZIP files you want to submit:
publish-extension \
--chrome-zip dist/chrome.zip \
--firefox-zip dist/firefox.zip --firefox-sources-zip dist/sources.zip \
--edge-zip dist/chrome.zip \
--opera-zip dist/opera.zippublish-extension will automatically look for a .env.submit file and load it if it exists.
import { publishExtension } from 'publish-browser-extension';
const results = await publishExtension({
// ...
});
console.log(results);Refer to the Config Reference.
bun iinit command to generate a .env.submit file for testingbun publish-extension init[!WARNING]
Make sure to set the Firefox channel to "unlisted", chrome's publish target to "trustedTesters", and don't submit the extension for review for Chrome or Edge. This will prevent you from accidentally releasing one of the test extensions publicly.
bun dev:all
bun dev:chrome
bun dev:firefox
bun dev:edge
bun dev:operaNo open issues yet, or sync has not completed.