The action allows you to build and sign your Web Extension for offline distribution. Read more details at Alternative Extension Distribution Options.
Based on ChromeCrxBuilder package.
-
zipFilePathRequired
Path to zip file with extension (relative to repository) -
crxFilePathRequired
Path to save result crx file (relative to repository) -
privateKeyRequired
Contents of private key used to sign crx file. Save it to Secrets! -
updateXmlPath
path to save update.xml file (relative to repository) for extensions hosted not on Chrome Web Store. This xml is used as response at url, specified in manifest''supdate_urlkey file.
If specified, set the following inputs:-
updateXmlCodebaseUrlRequired
URL to the .crx file for clients. -
updateXmlAppId
App Id to use in update.xml file. Generated from private key by default.
-
crxFilePaththe absolute path to built crx fileupdateXmlFilePaththe absolute path to built update.xml file
Use webext-buildtools-pack-extension-dir-action
to pack your extension directory and provide zipFilePath input (see example).
steps:
# pack zip and read manifest, can be reused in the following steps
- id: packExtensionDir
uses: cardinalby/webext-buildtools-pack-extension-dir-action@v1
with:
extensionDir: 'extension'
zipFilePath: 'build/extension.zip'
- uses: cardinalby/webext-buildtools-chrome-crx-action@v2
with:
# zip file made at the packExtensionDir step
zipFilePath: 'build/extension.zip',
crxFilePath: 'build/extension.crx'
privateKey: ${{ secrets.CHROME_CRX_PRIVATE_KEY }},
# The following is optional if you need update.xml file
updateXmlPath: 'build/update.xml',
updateXmlCodebaseUrl: 'http://...'