-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add github action to deploy to web stores #875
base: master
Are you sure you want to change the base?
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.lock
file so thatnpm ci
could 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)