How to automate publishing Chrome extension to the Web store?

前端 未结 3 1907
长情又很酷
长情又很酷 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 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
    

提交回复
热议问题