π¦π¦π semantic-release-web-ext
is a set of plugins for semantic-release
that automates
the process of publishing Firefox add-ons using the web-ext tool.
It ensures that your add-ons are released in a consistent and reliable manner.
npm install --save-dev semantic-release-web-ext
Using defaults
{
"release": {
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"semantic-release-web-ext",
"@semantic-release/github"
]
}
}
Providing configuration options. For example, publish artifacts in GitHub Releases.
{
"release": {
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"semantic-release-web-ext",
{
"artifactsDir": "extension-dist"
}
],
[
"@semantic-release/github",
{
"assets": ["extension-dist/*"]
}
]
]
}
}
The package implements the following plugins
Verifies the environment variables and plugin options, uses web-ext
lint
command to validate extensions manifest and source code files
Updates manifest.json
file with next version.
Publishes extension using web-ext
sign
command
Config option | Environment variable | Default value | Description |
---|---|---|---|
WEB_EXT_API_KEY | REQUIRED. API key (JWT issuer) for accessing the addons.mozilla.org API | ||
WEB_EXT_API_SECRET | REQUIRED API secret (JWT secret) from addons.mozilla.org API | ||
channel | WEB_EXT_CHANNEL | listed | publish channel, "listed" or "unlisted" |
sourceDir | WEB_EXT_SOURCE_DIR | dist | The directory of the extension's source code |
artifactsDir | WEB_EXT_ARTIFACTS_DIR | artifacts | The path of a directory to save artifacts in |
approvalTimeout | WEB_EXT_APPROVAL_TIMEOUT | web-ext lib default | Number of milliseconds to wait for approval before giving up |
validationTimeout | WEB_EXT_VALIDATION_TIMEOUT | web-ext lib default | Number of milliseconds to wait for validation before giving up |
amoBaseUrl | WEB_EXT_AMO_BASE_URL | https://addons.mozilla.org/api/v5/ | Add-on submission API base URL |