Add github action to deploy to web stores#875
Add github action to deploy to web stores#875ColdSauce wants to merge 3 commits intogildas-lormeau:masterfrom
Conversation
|
Also if you'd like me to create a similar PR for your SingleFileZ repo, or any other browser extension you'd like this on, please LMK! |
|
Thank you for the contribution, that looks interesting. How could I handle private keys like the one in the |
|
Sounds great! Is this a key that's necessary for deployment? |
|
Yes, the key is needed for deployment. FYI, I'm referring to the string below. BTW, I also need to submit the source code of the extension (singlefile-extension-source.zip) on the Mozilla store, does the the action take this into account? |
|
Ah got it! Okay, I'll build something that can address both requirements. We're lucky because the new Mozilla Add-On API (v5) allows for uploading the source alongside the minified version. We'll have to upgrade our source to use the new For the key storage, I think we might be able to use something like rollup-plugin-inject-process-env which will inject env vars into the distribution on build time. That way, you can set up a Github secret containing the api key as So after this is working, that line of code might look something like this: I'll get back to you in a few days after hacking around a bit on this stuff, and hopefully will have addressed both requirements! |
Hey @gildas-lormeau, we created a Github action to make it easier to publish extensions to the various web stores.
Thought you might find it useful so I added a Github workflow that will run the build step and publish to the web stores you specify, on dispatch. I also added a
package-json.lockfile so thatnpm cicould be run to make installing faster.The only thing you would need to create is a SUBMIT_KEYS GitHub repository secret.
This secret is a JSON, with the schema defined here.
Here's a sample key:
You can find instructions on how to get those keys in the schema, or if you use vscode, the schema should provide hint/intelisense when hovering over the json properties. If you need any help in setting up the keys, feel free to @ me.
Otherwise, if this doesn't seem necessary, feel free to close the PR!
(I discovered this bug upon creating this PR)