Skip to content
forked from PlasmoHQ/bpp

๐Ÿš€ Browser Platform Publisher

License

Notifications You must be signed in to change notification settings

drmikecrowe/bpp

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

plasmo logo

See License Follow PlasmoHQ on Twitter Watch our Live DEMO every Friday Join our Discord for support and chat about our projects typescript-action status

Browser Platform Publisher

A GitHub action from Plasmo to publish your browser extension to every web store/add-ons marketplace. This action and its dependencies are open-sourced under the MIT license. The core modules are:

Usage

In order to use this action, you will need to create a json file that contains the keys and optional configuration for each browser you wish to publish to.

To help you create it, we have provided a JSON schema that can be used with editors that support it, such as Visual Studio Code. This schema will provide intellisense and validation to ensure that your configuration is correct.

{
  "$schema": "https://github.com/PlasmoHQ/bpp/raw/main/keys.schema.json"
}

NOTE: You should only specify the browsers you wish to publish to. If there are any invalid configuration, the action will fail! I.e, no empty key allowed such as "chrome": {}.

Each browser option is made of the following:

  • Mandatory browser specific tokens (see token guide)

  • Optional parameters:

    • zip: The zip file containing the extension. The manifest.json file must be in the root of the zip file.

      {version} can be used in the name and will be replaced by the version from your versionFile.

    • file: An alias for the zip property.

    • verbose: Enable verbose logging for the specific browser.

    • versionFile: Relative path to a json file which has a version field. Defaults to package.json

    • notes: [Edge Only] Provide notes for certification to the Edge Add-ons reviewers.

The final json might look like this:

{
  "$schema": "https://github.com/PlasmoHQ/bpp/raw/main/keys.schema.json",
  "chrome": {
    "zip": "chromium_addon_{version}.zip",
    "clientId": "1280623",
    "clientSecret": "1!9us4",
    "refreshToken": "7&as$a89",
    "extId": "akszypg"
  },
  "firefox": {
    "file": "firefox_addon.xpi",
    "extId": "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
    "apiKey": "ab214c4d",
    "apiSecret": "e%f253^gh"
  },
  "edge": {
    "zip": "chromium_addon.zip",
    "clientId": "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
    "clientSecret": "ab#c4de6fg",
    "productId": "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
    "accessTokenUrl": "https://login.microsoftonline.com/aaaaaaa-aaaa-bbbb-cccc-dddddddddddd/oauth2/v2.0/token",
    "notes": "This is a test submission"
  }
}

Once you got your json file, you will need to copy its content into a GitHub secret. You can do this by following the instructions on creating encrypted secrets for a repository. In this example, we will use the secret name BPP_KEYS.

Then, the action can be used as follows:

steps:
  - name: Browser Platform Publish
    uses: PlasmoHQ/bpp@v3
    with:
      keys: ${{ secrets.BPP_KEYS }}

Action Input Parameters (with)

The following parameters can be used to override the configuration in the keys file. Specifying options here will override those in the keys file.

  keys:
    required: true
    description: "A JSON string containing the keys to be used for the submission process. (This should be a secret)"
  artifact:
    alias: [zip, file]
    required: false
    description: "The extension zip artifact to be published on all stores."
  opera-file/chrome-file/firefox-file/edge-file:
    required: false
    description: "The file to be published to a specific store."
  notes:
    alias: [edge-notes]
    required: false
    description: "[Edge only] A release note cataloging changes."
  verbose:
    required: false
    description: "Print out more verbose logging."
  version-file:
    required: false
    description: "The path to a json file with a version field, default to package.json."

Custom input parameters example

steps:
  - name: Browser Platform Publish
    uses: PlasmoHQ/bpp@v3
    with:
      keys: ${{ secrets.BPP_KEYS }}
      chrome-file: "chrome/myext_chromium_${{ env.EXT_VERSION }}.zip"
      edge-file: "edge/myext_edge_${{ env.EXT_VERSION }}.zip"
      edge-notes: "This is a test submission"
      version-file: "src/manifest.json"
      verbose: true

Support

Join the Discord channel!

License

MIT โญ Plasmo Corp.

About

๐Ÿš€ Browser Platform Publisher

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 77.4%
  • JavaScript 22.6%