Performs first step of WebExtension deployment: uploads zip to Chrome Web Store. See publish action to continue deployment.
Based on ChromeWebstoreBuilder package.
-
zipFilePath
Required
Path to packed extension (relative to repository) You can use webext-buildtools-pack-extension-dir-action to pack your extension directory and provide this input from it's output -
extensionId
Required
Your extension id in Chrome Web Store -
To allow action accessing to Chrome Webstore API you can choose 2 ways:
-
Set
apiAccessToken
input directly (you can obtain it using google-api-fetch-token-action) -
Set the following inputs to let action get access token for you. Read Using the Chrome Web Store Publish API, How to generate Google API keys to learn how to obtain these values.
apiClientId
RequiredapiClientSecret
RequiredapiRefreshToken
Required
Don't forget to store sensitive data as secrets.
-
-
To handle long item processing (if after upload API returns
IN_PROGRESS
state) optionally you can specify 2 following inputs to check until it hasSUCCESS
state:waitForUploadCheckCount
Checks count in case of upload finished with IN_PROGRESS statuswaitForUploadCheckIntervalMs
Checks interval in ms in case of upload finished with IN_PROGRESS status
-
oldVersion
Version of extension before uploading -
newVersion
Version of extension after uploading (if was uploaded) -
newerVersionAlreadyUploadedError
check if step failed
true
if failed because newer extension version is already uploaded -
sameVersionAlreadyUploadedError
check if step failed
true
if failed because same extension version is already uploaded -
inReviewError
check if step failed
true
if failed because item is currently in review and upload was rejected
uses: cardinalby/webext-buildtools-chrome-webstore-action@v1
with:
zipFilePath: 'build/extension.zip'
extensionId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
apiClientId: ${{ secrets.G_CLIENT_ID }}
apiClientSecret: ${{ secrets.G_CLIENT_SECRET }}
apiRefreshToken: ${{ secrets.G_REFRESH_TOKEN }}
According to Google's guide, the refresh token might stop working if it has not been used for six months.
To avoid that, schedule google-api-fetch-token-action action with the same credentials.
If you are interested in the building the entire deployment workflow for WebExtension, you can read this article.