{"id":20425441,"url":"https://github.com/tophat/semantic-release-firefox-add-on","last_synced_at":"2025-05-08T16:32:10.398Z","repository":{"id":35102984,"uuid":"202787382","full_name":"tophat/semantic-release-firefox-add-on","owner":"tophat","description":"🦊 A Semantic Release plugin to sign Firefox Add Ons using web-ext","archived":false,"fork":false,"pushed_at":"2024-04-15T09:38:15.000Z","size":3903,"stargazers_count":19,"open_issues_count":21,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-04T16:54:49.749Z","etag":null,"topics":["firefox","mozilla","semantic-release","semantic-release-plugin","web-ext","xpi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tophat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-16T19:27:38.000Z","updated_at":"2024-09-07T15:10:25.000Z","dependencies_parsed_at":"2023-12-15T18:48:05.667Z","dependency_job_id":"84cba3f5-66b6-4c16-892c-1c1518045d0e","html_url":"https://github.com/tophat/semantic-release-firefox-add-on","commit_stats":{"total_commits":391,"total_committers":9,"mean_commits":43.44444444444444,"dds":"0.11253196930946296","last_synced_commit":"5fb1a8eda8379503121d96f26248c03bace0ab8a"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":"tophat/new-project-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tophat%2Fsemantic-release-firefox-add-on","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tophat%2Fsemantic-release-firefox-add-on/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tophat%2Fsemantic-release-firefox-add-on/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tophat%2Fsemantic-release-firefox-add-on/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tophat","download_url":"https://codeload.github.com/tophat/semantic-release-firefox-add-on/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224742403,"owners_count":17362232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firefox","mozilla","semantic-release","semantic-release-plugin","web-ext","xpi"],"created_at":"2024-11-15T07:13:21.422Z","updated_at":"2024-11-15T07:13:22.384Z","avatar_url":"https://github.com/tophat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semantic-release-firefox-add-on\n[![Semantic Release Firefox Add-on\nCICD](https://github.com/tophat/semantic-release-firefox-add-on/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/tophat/semantic-release-firefox-add-on/actions/workflows/main.yml)\n[![npm version](https://img.shields.io/npm/v/semantic-release-firefox-add-on.svg)](https://badge.fury.io/js/semantic-release-firefox-add-on)\n[![codecov](https://codecov.io/gh/tophat/semantic-release-firefox-add-on/branch/master/graph/badge.svg)](https://codecov.io/gh/tophat/semantic-release-firefox-add-on)\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n\n## Overview\n\n\u003cimg align=\"right\" width=\"200\" height=\"200\" src=\"https://user-images.githubusercontent.com/2528959/65039978-65686780-d921-11e9-9d2a-48a5063ccb94.png\" alt=\"Logo\"\u003e\n\nThis package provides a set of [`semantic-release`][semantic-release] plugins for you to easily publish Firefox add ons automatically. Mozilla requires that even self-distributed packages are signed through the add on store. Given a built package, it will write the correct version number into `manifest.json` and upload the dist folder to the add on store. The package will be validated by Mozilla, and if valid, a signed distribution will be returned and downloaded into the artifacts folder.\n\n## Motivation\n\nWe were working on a dev tooling extension internally and wanted to release it through the Chrome web store and Mozilla Add On store. The [`semantic-release-chrome`][semantic-release-chrome] extension worked wonderfully, but we kept struggling to find a [`semantic-release`][semantic-release] plugin for FireFox that worked the way we wanted. After finding that [`web-ext`][web-ext] had a Node api, we just built our own plugins using `web-ext` to accomplish the goal.\n\n## Installation\n\nThis module is distributed via [npm][npm] which is bundled with [node][node] and\nshould be installed as one of your project's `devDependencies`:\n\n```bash\nnpm install --save-dev semantic-release-firefox-add-on\n```\n\n### Mozilla Add On authentication\n\nYou will need to get two parameters from the Add On store: an `API Key`, and a `Secret Key`. For more information on how to get those parameters and how to set the environment variables which are required in order for this plugin to work properly, read [this guide](https://addons-server.readthedocs.io/en/latest/topics/api/auth.html#access-credentials).\n\nweb-ext takes care of creation of the JWT, the only items needed are the `API Key` and `Secret Key`.\n\n## Usage\n\nThis package export the following plugins:\n\n### `verifyConditions`\n\nVerify the following:\n\n- That environment variables are set for Add On store authentication\n- That an extensionId was specified in the configuration\n- That the source directory is built and that we can locate the manifest.json file within the source directory\n\n### Environment variables\n\n- `FIREFOX_API_KEY`: **REQUIRED** Mozilla add-on server api key used in webext sign command\n- `FIREFOX_SECRET_KEY`: **REQUIRED** Mozilla add-on server api secret used in webext signing\n\nFor more information on the source of these values, see [Mozilla Add On authentication](#mozilla-add-on-authentication)\n\n#### `verifyConditions` parameters\n\n- `extensionId`: **REQUIRED** The extension id of the extension from the Mozilla Add On store. If this is not specified then a new extension will be created each time the release is run. In order to avoid issues arising due to this, the extension must be created in the Add On store first and the extension Id put into the semantic release configuration.\n\n- `targetXpi`: **REQUIRED** The filename of the XPI file to store in the artifacts directory.\n\n- `sourceDir`: The path of the source directory. Defaults to `dist`.\n\n- `manifestPath`: The location of the manifest file within the source directory. Defaults to `manifest.json`.\n\n### `prepare`\n\nWrites the correct version to the `manifest.json`.\n\nThis plugin requires some parameters to be set, so be sure to check below and fill them accordingly.\n\n#### `prepare` parameters\n\n- `sourceDir`: The path of the source directory. Defaults to `dist`.\n\n- `manifestPath`: The location of the manifest file within the source directory. Defaults to `manifest.json`.\n\n### `publish`\n\nCreates an unsigned XPI file out of the source directory and uploads it to the Mozilla Add On, using the web-ext sign command. The output from the sign command will be passed through to the console. If the package is validated and signed, it will download the signed XPI file and store it in the artifacts directory under the specified file name. If the package is validated but not signed (including the case where manual review is required), it will store the unsigned XPI file in the artifacts directory.\n\n#### `publish` parameters\n\n- `extensionId`: **REQUIRED** The extension id of the extension from the Mozilla Add On store.\n\n- `targetXpi`: **REQUIRED** The filename of the XPI file to store in the artifacts directory.\n\n- `sourceDir`: The path of the source directory. Defaults to `dist`.\n\n- `channel`: The release channel, options are `unlisted` or `listed`. An unlisted add on is not published to the store and is justed signed. Defaults to `unlisted`.\n\n- `artifactsDir`: The location to store the signed XPI file when it is returned from Mozilla. Defaults to `./artifacts`.\n\n## Contribution\n\nFollow the [contributing guide](docs/contributing.md).\n\n### Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/dbasilio\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/8311284?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaniel Basilio\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=dbasilio\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=dbasilio\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-dbasilio\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#ideas-dbasilio\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/pulls?q=is%3Apr+reviewed-by%3Adbasilio\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://emmanuel.ogbizi.com\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/2528959?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEmmanuel Ogbizi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=iamogbz\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=iamogbz\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#design-iamogbz\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#infra-iamogbz\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=iamogbz\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/iorate\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/682043?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eiorate\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/tophat/semantic-release-firefox-add-on/commits?author=iorate\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.karnov.club/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6210361?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMarc Cataford\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-mcataford\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n_Add more contributors using [all-contributors](https://allcontributors.org/)_\n_by adding comments in PRs:_\n\n```text\n@all-contributors please add \u003cusername\u003e for \u003ccontribution type\u003e\n```\n\n[npm]: https://www.npmjs.com/\n[node]: https://nodejs.org\n[semantic-release]: https://github.com/semantic-release/semantic-release\n[semantic-release-chrome]: https://github.com/GabrielDuarteM/semantic-release-chrome\n[web-ext]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Getting_started_with_web-ext\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftophat%2Fsemantic-release-firefox-add-on","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftophat%2Fsemantic-release-firefox-add-on","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftophat%2Fsemantic-release-firefox-add-on/lists"}