Skip to content

πŸ¦ŠπŸ“¦πŸš€ A semantic-release plugin to publish Firefox add-ons using web-ext

License

Notifications You must be signed in to change notification settings

husa/semantic-release-web-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

semantic-release-web-ext

πŸ¦ŠπŸ“¦πŸš€ 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.

Installation

npm install --save-dev semantic-release-web-ext

Example

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/*"]
        }
      ]
    ]
  }
}

Usage

The package implements the following plugins

verifyConditions

Verifies the environment variables and plugin options, uses web-ext lint command to validate extensions manifest and source code files

prepare

Updates manifest.json file with next version.

publish

Publishes extension using web-ext sign command

Configuration

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

Similar plugins

About

πŸ¦ŠπŸ“¦πŸš€ A semantic-release plugin to publish Firefox add-ons using web-ext

Resources

License

Stars

Watchers

Forks

Packages

No packages published