sleaper / webext-buildtools-firefox-sign-xpi-action

Create and sign Firefox xpi file for offline distribution of WebExtension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js CI

Sign Firefox xpi file

Create and sign Firefox xpi file for offline distribution of WebExtension. Read "Signing and distributing your add-on" for details. Based on FirefoxAddonsBuilder package.

API access

To setup API access you need to generate jwtIssuer and jwtSecret (https://addons.mozilla.org/en-US/developers/addon/api/key/):

Inputs

๐Ÿ”ธ zipFilePath Required

Path to packed extension (relative to the repository). You can use webext-buildtools-pack-extension-dir-action to pack your extension directory and provide this input from it's output.

๐Ÿ”ธ xpiFilePath Required

Path to save xpi file (relative to the repository).

๐Ÿ”น extensionId

UUID of an extension uploaded to Firefox Addons especially for offline distribution. It should be different from id of your published extension. If not specified, new extension will be added to your addons list every build (not recommended).

๐Ÿ”ธ jwtIssuer Required

JWT issuer also called "apiKey" obtained from created credentials. Use secrets!

๐Ÿ”ธ jwtSecret Required

JWT secret also called "apiSecret" obtained from created credentials. Use secrets!

๐Ÿ”น channel Default: most recently used channel

The release channel (listed or unlisted). Ignored for new add-ons, which are always unlisted.

๐Ÿ”น timeoutMs Default: 120000

Number of milliseconds to wait before aborting the request.

Outputs

๐Ÿ”ป xpiFilePath

Absolute path to result xpi file.

๐Ÿ”ป sameVersionAlreadyUploadedError

true if the action failed because the version you try to sign already exists at server.

Usage example

uses: cardinalby/webext-buildtools-firefox-sign-xpi-action@v1
with:
  zipFilePath: 'build/extension.zip'
  xpiFilePath: 'build/extension.signed.xpi'
  jwtIssuer: ${{ secrets.FF_JWT_ISSUER }}
  jwtSecret: ${{ secrets.FF_JWT_SECRET }}

If you are interested in the building the entire deployment workflow for WebExtension, you can read this article.

About

Create and sign Firefox xpi file for offline distribution of WebExtension

License:MIT License


Languages

Language:TypeScript 100.0%