Skip to content
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

Adding extension submission via github action #1407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

louisgv
Copy link

@louisgv louisgv commented Feb 17, 2022

Hi friends,

Thanks for creating stylus, my family and I have been a fan for years. Was looking for some way to contribute, and thought that maybe an automated submission pipeline for the zip archive could be helpful. I created a github action called bpp that can submit the zip to the Chrome/Firefox stores automatically. This PR uses that action for the submission, it is set to run manually from the github action tab, but we can tweak it to run as frequent as needed! 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 for chrome and firefox:

{
  "$schema": "https://raw.githubusercontent.com/plasmo-corp/bpp/main/keys.schema.json",
  "chrome": {
    "clientId": "123",
    "refreshToken": "789",
    "extId": "abcd"
  },
  "firefox": {
    "extId": "123",
    "apiKey": "abcd",
    "apiSecret": "efgh"
  }
}

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 :)

@tophf
Copy link
Member

tophf commented Feb 17, 2022

I think we should use a more popular action that is battle-tested and maintained, maybe adapt from another extension like Violentmonkey.

Actually, I would prefer that we use the web store API directly using a script in our own repository without relying on anything external (other than github's own config for the secrets) because you never know what can happen to third-party code.

@louisgv
Copy link
Author

louisgv commented Feb 17, 2022

violentmonkey uses chrome-webstore-upload underneath, which is used by bpp's internal module:

https://github.com/violentmonkey/violentmonkey/blob/master/.github/workflows/release.yml#L50

https://github.com/plasmo-corp/bpp/blob/main/pnpm-lock.yaml#L3679

bpp also do the work for firefox, opera, edge, and I'm working to get safari support soon.

@eight04
Copy link
Collaborator

eight04 commented Feb 17, 2022

See also mozilla/web-ext#804

@louisgv
Copy link
Author

louisgv commented Feb 23, 2022

See also mozilla/web-ext#804

I addressed this issue by using https://github.com/mozilla/sign-addon/ directly for bpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants