Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automate publishing Chrome extension to the Web store?

Starting from Google Chrome 21.x private update sites won't be supported anymore. This forces us to move our extension to the Google Web store. Previously, we used an automatic script that created .crx file, signed it, and uploaded to the update site.

Is there a way to do script uploading extension to the Google Web store?

like image 545
Michael Spector Avatar asked Aug 06 '12 05:08

Michael Spector


People also ask

How do I enable Chrome extensions automatically?

Just go to Chrome Web Store and install the Extension Automation for Google Chrome. For the extension to work properly, you need to let it access installed extensions, apps and themes. Once installed, click its icon and select what you want to do with any extension.

How do I distribute Chrome extensions?

Publish to the Chrome Web Store To make private extensions available to users outside of your domain, you would need to set up a “trusted tester” group and add them manually via email addresses within the Chrome Developer Dashboard. Any other users will not see the extension and will not be able to search for it.


2 Answers

Since March 2014, there is an API to do that. Documentation here.

I never worked with it, so I cannot provide a full example.

However, from the documentation, the basic flow would be an authenticated request with an updated package, followed by an authenticated request to publish:

> curl \
-H "Authorization: Bearer $TOKEN"  \
-H "x-goog-api-version: 2" \
-X PUT \
-T $FILE_NAME \
-v \
https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID

> curl \
-H "Authorization: Bearer $TOKEN"  \
-H "x-goog-api-version: 2" \
-H "Content-Length: 0" \
-X POST \
-v \
https://www.googleapis.com/chromewebstore/v1.1/items/$APP_ID/publish
like image 182
Xan Avatar answered Jan 18 '23 23:01

Xan


Here is my grunt plugin for this https://github.com/c301/grunt-webstore-upload.

But you still have to upload your extension first time, in order to get the extension id.

It solves only the uploading problem, you need to compile the ZIP file first. You can use this grunt plugin https://github.com/oncletom/grunt-crx ( I didn't test it ).

like image 33
Anton Avatar answered Jan 19 '23 01:01

Anton