/bpp

Browser Platform Publisher

Primary LanguageTypeScriptMIT LicenseMIT

typescript-action status

Browser Plugin Publisher

Use this action to publish your browser plugin to every browser plugin marketplace. This action and its dependencies are fully open source under the MIT license. The core modules are:

The action is updated regularly and is field-tested in cex

Usage

First, create a keys.json in your favorite text editor (preferably one that supports json-schema):

{
  "$schema": "https://raw.githubusercontent.com/plasmo-corp/bpp/v2/keys.schema.json"
}

A sample template is provided in keys.template.json, and the JSON schema is in keys.schema.json. If your editor supports json-schema, it should give you intellisense/autocompletion while working on the keys.

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

Copy the content of your keys.json into a github secret with a name of your choosing, in this case we used BPP_KEYS. Then, the action can be used as follows:

steps:
  - name: Browser Plugin Publish
    uses: plasmo-corp/bpp@v2
    with:
      keys: ${{ secrets.BPP_KEYS }}

NOTE: If you're publishing to the Opera store, you will need to set up Chromium for puppeteer before running bpp. In v3, we will hopefully deprecate the Puppeteer approach altogether (since it's quite a leaky abstraction), or have an option for BPP to download and set up the browser for you.

steps:
  - name: Setup Chrome
    uses: browser-actions/setup-chrome@latest
    with:
      chrome-version: latest
  - name: Browser Plugin Publish
    uses: plasmo-corp/bpp@v2
    env:
      PUPPETEER_EXECUTABLE_PATH: /opt/hostedtoolcache/chromium/latest/x64/chrome
    with:
      keys: ${{ secrets.BPP_KEYS }}

NOTE: If you skipped the zip parameter in your keys, and that your extension artifact is understood by the browser you specified, you can specify an artifact action parameter:

steps:
  - name: Browser Plugin Publish
    uses: plasmo-corp/bpp@v2
    with:
      artifact: build/artifact.zip
      keys: ${{ secrets.BPP_KEYS }}

This works if you're targeting a group of browsers that share a similar format, such as Chrome or Edge.

Acknowledgements

License

MITPlasmo Corp.