Skip to content
upload-cloud

GitHub Action

Chrome extension upload action

v5.0.0 Latest version

Chrome extension upload action

upload-cloud

Chrome extension upload action

upload & publish extensions to the Chrome Web Store

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Chrome extension upload action

uses: mnao305/chrome-extension-upload@v5.0.0

Learn more about this action in mnao305/chrome-extension-upload

Choose a version

chrome-extension-upload

This Action allows you to automatically upload and publish browser extensions to the Chrome web store.

This action is a wrapper for chrome-webstore-upload.

Input variables

name required description
file-path true The path to the zip file. ex. dist/hoge.zip
extension-id true
client-id true
client-secret true
refresh-token true
glob false If you set it to true, you can specify the file as a glob pattern.
Please note that only the first match will be uploaded.
publish false If you set it to false, the extension will not be published. Default as true.
Use this option if you want to upload the extension but not publish it for testing.

Want to know how to make a CLIENT ID, etc.?
Reference link

Usage

Simple example:

name: Publish

on:
  push:
    tags:
      - '*'

jobs:
  build:
    name: Publish webextension
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: 20
    - name: Build
      run: |
        npm ci
        npm run build
    - name: Upload & release
      uses: mnao305/chrome-extension-upload@v5.0.0
      with:
        file-path: dist/file.zip
        extension-id: hogefuga(extension id)
        client-id: ${{ secrets.CLIENT_ID }}
        client-secret: ${{ secrets.CLIENT_SECRET }}
        refresh-token: ${{ secrets.REFRESH_TOKEN }}

Example with glob:

name: Publish

on:
  push:
    tags:
      - '*'

jobs:
  build:
    name: Publish webextension
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: 20
    - name: Build
      run: |
        npm ci
        npm run build
    - name: Upload & release
      uses: mnao305/chrome-extension-upload@v5.0.0
      with:
        file-path: dist/*.zip
        extension-id: hogefuga(extension id)
        client-id: ${{ secrets.CLIENT_ID }}
        client-secret: ${{ secrets.CLIENT_SECRET }}
        refresh-token: ${{ secrets.REFRESH_TOKEN }}
        glob: true

Example with publish for testing:

name: Test

on:
  push:
    tags:
      - '*'

jobs:
  build:
    name: Publish webextension
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: 20
    - name: Build
      run: |
        npm ci
        npm run build
    - name: Upload & release
      uses: mnao305/chrome-extension-upload@v5.0.0
      with:
        file-path: dist/file.zip
        extension-id: hogefuga(extension id)
        client-id: ${{ secrets.CLIENT_ID }}
        client-secret: ${{ secrets.CLIENT_SECRET }}
        refresh-token: ${{ secrets.REFRESH_TOKEN }}
        publish: false

Example with publish-target for publishing to trustedTesters:

name: Test

on:
  push:
    tags:
      - '*'

jobs:
  build:
    name: Publish webextension
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-node@v1
      with:
        node-version: 20
    - name: Build
      run: |
        npm ci
        npm run build
    - name: Upload & release
      uses: mnao305/chrome-extension-upload@v5.0.0
      with:
        file-path: dist/file.zip
        extension-id: hogefuga(extension id)
        client-id: ${{ secrets.CLIENT_ID }}
        client-secret: ${{ secrets.CLIENT_SECRET }}
        refresh-token: ${{ secrets.REFRESH_TOKEN }}
        publish-target: trustedTesters