toolbox-team / reddit-moderator-toolbox

Moderator toolbox for reddit extension development.
https://www.reddit.com/r/toolbox
Apache License 2.0
113 stars 37 forks source link

Automated deployment based on release tags. #227

Open creesch opened 4 years ago

creesch commented 4 years ago

As the title says:

Only thing we can't yet automate afaik is new edge deployment. I think the RES team had a call with microsoft over how the API should look like.

https://addons-server.readthedocs.io/en/latest/topics/api/signing.html https://developer.chrome.com/webstore/using_webstore_api (this is what RES uses)

eritbh commented 3 years ago

There was some additional conversation around this on Discord: https://discord.com/channels/535490452066009090/535490452066009093/823686233820495933

creesch commented 3 years ago

Just some brainstorming, I was impressed with how easy it was to make a dedicated github action the other day. So I am basically wondering if it makes sense to have all the publish code in a separate repo as a github action (possibly even one per browser but that seems a bit overkill).

As far as the actual implementation goes. I had a look at RES and they use something erikdesjardins from their team made for firefox and chrome:

For both modules they point to possibly better alternatives but it is a good starting point.

creesch commented 3 years ago

Automated deployment is still a WIP on microsofts side from what I have been told. Should however mirror chromes deployment apis so if all goes well it is only an endpoint swap.

eritbh commented 3 years ago

basically wondering if it makes sense to have all the publish code in a separate repo as a github action

I like this idea - wouldn't even be opposed to making one action per store, as long as general input options are consistent between them. Whatever creates a simpler interface.

That said, given chrome-webstore-upload-cli exists (a listed alternative to erik's Chrome upload package), it might make more sense to just use that in a build step. I'm not sure if something analogous exists for Firefox, and I'm struggling to find documentation for an AMO submission API. Not sure if you've taked more with the other RES folks about this, but it's probably worth getting their recommendation on deployment tools to use for new projects.

creesch commented 3 years ago

That said, given chrome-webstore-upload-cli exists (a listed alternative to erik's Chrome upload package), it might make more sense to just use that in a build step.

Possibly, I was mostly thinking about benefits being that the publish mechanism is maintained separately as it means we can easily do work there whatever the state of the toolbox repo is (not that big of a concern) and also control a bit better who gets to touch the code that actually does the publishing. Not really sure if those are truly benefits, I might just have liked playing with github actions a bit too much 😁

and I'm struggling to find documentation for an AMO submission API.

I found it a while ago there are a few libraries for it as well.

eritbh commented 3 years ago

Actions are definitely good for this kind of thing, I'm mostly just trying to avoid reinventing the wheel. Making separate actions for deploy steps seems like a good strategy if there isn't already an existing CLI solution for uploading Firefox extensions (even if the action just ends up being a wrapper around some Node library or something).