DEV Community

Cover image for Automate your chrome extension deployment in minutes!

Automate your chrome extension deployment in minutes!

Gokul Kathirvel on March 27, 2018

[cover photo by Simon Schmitt on Unsplash ] NOTE: recently (2nd Sept 2018) rewrote this blog to use 'chrome-webstore-upload' (previous...
Collapse
 
beshur profile image
Alex Buznik

Hi!
Thank you for the tutorial.

As we already using Grunt for building, I used grunt-webstore-upload package which does all the stuff pretty good, no extra code needed.

Anyway, thanks for a great link for the token refresher retrieval - it's awesome.

Cheers!

Collapse
 
gokatz profile image
Gokul Kathirvel • Edited

Thanks for the feedback @beshur :)
Yup. Grunt, a task runner, will not be needed in many cases especially if we opt for a CI/CD setup.

Collapse
 
beshur profile image
Alex Buznik

However we still need to do some clear up and zipping - grunt is good for that, and still needed for Travis.

Collapse
 
dangolant profile image
Daniel Golant

This is excellent! The CRX upload/deploy process is sooo tedious normally. Question though: I have to remove certain fields when I deploy (the key field, which gets sourced from key.pem instead) but for some reason I need to have it locally. Any advice on automatically stripping it from manifest?

Collapse
 
gokatz profile image
Gokul Kathirvel • Edited

Hi Daniel, Sorry that I missed your comment :( I'm working on something similar to this. I need to change some source for the staging environment. Will definitely let you know once I'm done.

Meanwhile, will this package be helpful? npmjs.com/package/chrome-manifest

Collapse
 
jpamorgan profile image
John Philip Morgan

Hi @gokatz ,

thanks for the great tutorial. I was able to get the zip packaging and uploading to work great, but no matter what I try I can't get the publishing to work. When I check for the uploaded file in the webstore dashboard I see it is ready for publishing and I can do it manually just fine. When the POST request runs to publish I get a nondescript error from the endpoint. I have even tried multiple different packages for uploading/publishing the zip.

{"name":"production","nameType":"extension","appError":"WU_FAILED_TO_PUBLISH_EXTENSION","more":{"errors":[{"domain":"global","reason":"badRequest","message":"Publish condition not met: "}],"code":400,"message":"Publish condition not met: "}}
Collapse
 
gokatz profile image
Gokul Kathirvel

Hi John, Glad that you liked the article 🙂

I'm not sure what was the issue in this scenario as the failed condition was not mentioned in the response unlike here. Is the deployment process is open-sourced? so that I can have a look.

Another question, was the first deployment done directly via webstore?