Git Product home page Git Product logo

webext-buildtools-chrome-webstore-upload-action's Introduction

Node.js CI

Upload your WebExtension to Chrome Web Store

Performs first step of WebExtension deployment: uploads zip to Chrome Web Store. See publish action to continue deployment.

Based on ChromeWebstoreBuilder package.

Inputs

  • 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:

    1. Set apiAccessToken input directly (you can obtain it using google-api-fetch-token-action)

    2. 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 Required
      • apiClientSecret Required
      • apiRefreshToken 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 has SUCCESS state:

    • waitForUploadCheckCount
      Checks count in case of upload finished with IN_PROGRESS status
    • waitForUploadCheckIntervalMs
      Checks interval in ms in case of upload finished with IN_PROGRESS status

Outputs

  • 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

Simple usage example

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 }}

Google refresh token expiration

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.

webext-buildtools-chrome-webstore-upload-action's People

Contributors

actions-user avatar cardinalby avatar dependabot[bot] avatar djahandarie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.