How to automate publishing Chrome extension to the Web store?

前端 未结 3 1908
长情又很酷
长情又很酷 2021-01-31 05:09

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

相关标签:
3条回答
  • 2021-01-31 05:52

    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 ).

    0 讨论(0)
  • 2021-01-31 05:57

    Actually, you cannot do it because of security issue. But you can build your extension to zip file automatically, then you just upload that zip file to Google Web Store. That's all!

    0 讨论(0)
  • 2021-01-31 06:03

    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
    
    0 讨论(0)
提交回复
热议问题