A semantic-release plugin for publishing Firefox add-ons to AMO (addons.mozilla.org) using the official AMO API.
Existing plugins for publishing Firefox add-ons with semantic-release have notable limitations:
- semantic-release-firefox relies on browser automation via Puppeteer rather than the official AMO API, which may reduce robustness and maintainability.
- semantic-release-firefox-add-on is no longer maintained—the GitHub repository has been deleted and future updates are unlikely. It also does not support source code submission, which is required for some add-ons.
semantic-release-amo addresses these issues by utilizing the official AMO API V5 for reliable publishing and source code submission.
npm install -D semantic-release-amo
Step | Description |
---|---|
verifyConditions |
Verifies the environment variables and plugin options. |
prepare |
Updates manifest.json and archives the add-on. |
publish |
Publishes the add-on to AMO. |
Variable | Description |
---|---|
AMO_API_KEY |
REQUIRED. The API key used to publish the add-on to AMO. |
AMO_API_SECRET |
REQUIRED. The API secret used to publish the add-on to AMO. |
AMO_BASE_URL |
The base URL of AMO. Defaults to https://addons.mozilla.org/ . |
Option | Description |
---|---|
addonId |
REQUIRED. The ID of the add-on. Can be either a slug or a GUID. |
addonDirPath |
REQUIRED. The path to the directory containing the add-on. |
addonZipPath |
The path to the zip file to archive the add-on. Defaults to "./semantic-release-amo/${nextRelease.version}.zip" . |
channel |
The channel to publish the add-on. Accepts "listed" or "unlisted" . Defaults to "listed" . |
approvalNotes |
Notes for Mozilla reviewers. |
compatibility |
Applications the add-on is compatible with. Accepts an array containing "firefox" and/or "android" . Defaults to ["firefox"] . |
submitReleaseNotes |
Whether to submit release notes generated by @semantic-release/release-notes-generator . Defaults to false . |
submitSource |
Whether to submit the source code files as listed by git ls-files . Defaults to false . |