fregante / browser-extension-template

📕 Barebones boilerplate with Parcel 2, options handler and auto-publishing
788 stars 76 forks source link

Add GitHub Action deployment #21

Closed fregante closed 4 years ago

fregante commented 5 years ago

Closes #19

Needs a bit more work and testing, but at least the overall logic seems to work

fregante commented 5 years ago

I think this is ready, it just needs some documentation.

Also it would be great if you could send this extension to CWS and AMO for real, but unlisted, so we can make sure this always actually works and we can keep the yml files active instead of having to disable the push commands (like I did with echo and commenting them out)

fregante commented 5 years ago

If you can publish this extension and plug in the secrets in your settings it'd be great so we can merge it.

sindresorhus commented 4 years ago

This has a lot of boilerplate. Instead of a template, why not make a reusable GitHub Actions action?

fregante commented 4 years ago

It wouldn't save a whole lot if we want to keep the publishing to the 2 stores in 2 separate jobs (which would save us from a few issues we had before)

If you look at the actual code run, it's very specific to this workflow. Most of the boilerplate is because we can't easily share data between jobs (e.g. the version)

fregante commented 4 years ago

It could be further shortened by merging delete-tag, build and tag jobs, but not substantially

notlmn commented 4 years ago

image

AMO reviewers don't let me list the extension, no word from CWS reviewers.

The publish part should work as intended though, or I might be wrong.

fregante commented 4 years ago

Sounds bad at first but it just says it can't be listed by them: that means we can still use the whole process but it won't appear on the site.

That's exactly what we need. We don't actually need to distributed it, but just to test the upload process.

notlmn commented 4 years ago

That's exactly what we need. We don't actually need to distributed it, but just to test the upload process.

Manually ran web-ext-submit to see if Mozilla is still allowing publishing extension, they do, but it unlisted and only owners can see the extension on AMO. Which is also kinda what we want but would be a problem if they remove it entirely at some point. Have to ask them to keep the extension unlisted and restricted if they do take it down in the future.

We do not have any issues with Chrome extension (apart from the very slow review cycles), the extension is unlisted and allows deployment without any complaints.


We should also update docs accordingly, moving all steps from Travis to GHA, and also mention how the new auto-publishing mechanism works.

fregante commented 4 years ago

We should also update docs accordingly, moving all steps from Travis to GHA, and also mention how the new auto-publishing mechanism works.

Will do

notlmn commented 4 years ago

image

Got another notice from AMO reviewers, maybe we should use a stub for AMO deployment.

fregante commented 4 years ago

The extension was still marked as LISTED/VISIBLE, of course they block it.

I marked it as unlisted now and I uploaded a new version manually. It's still awaiting review but according to your previous review this is allowed:

image

"you have to sign it and self-host"

fregante commented 4 years ago

Indeed they just approved it, however for some reason web-ext sign takes ages, probably never ending. This should be instant 🤦‍♂️

$ npx web-ext sign --source-dir distribution
Applying config file: ./package.json
Building web extension from ./distribution
Validating add-on [........................................................................................]
Validation results: https://addons.mozilla.org/en-US/developers/upload/15ee7c54221946ada5ba8303cd9c33a9
Signing add-on [...........................................................................................]
Downloading signed files: 100% 
Downloaded:
    ./web-ext-artifacts/awesome_extension-20.3.25.3-an+fx.xpi
Extension ID: awesome-extension@notlmn.github.io
SUCCESS

Edit: it took 4 minutes but it worked. This should be fine 👌

notlmn commented 4 years ago

The extension was still marked as LISTED/VISIBLE, of course they block it.

I didn't explicitly mark it as "unlisted" because the description sounded that it would disable the extension completely. My bad, should've tried that option too. 😅


however for some reason web-ext sign takes ages, probably never ending. This should be instant

Just created a new automated version release locally, it was instant, and Mozilla seems to auto validate if the extension is unlisted, was approved instantly too through "automatic validation".

$ npm run release:amo

> @ release:amo /mnt/d/dev/git/notlmn/brower-extension-template
> web-ext-submit --source-dir distribution

Applying config file: ./package.json
Building web extension from /mnt/d/dev/git/notlmn/brower-extension-template/distribution
Validating add-on [............................................................]
Validation results: https://addons.mozilla.org/en-US/developers/upload/63a940bbcefb4975bfbffb2cfe9315ec
Downloading signed files: 100%
Downloaded:
    ./web-ext-artifacts/awesome_extension-20.3.25.4-an+fx.xpi
Extension ID: awesome-extension@notlmn.github.io
SUCCESS

Anyway, it is working as intended, and should be good to go.

fregante commented 4 years ago

Docs updated.

Before merging we just need to clear those TODOs

fregante commented 4 years ago

Woot! Firefox deployment confirmed to work!

Tag created manually on GitHub: https://github.com/npmhub/npmhub/releases/tag/2020.3.28 Successful deployment: https://github.com/npmhub/npmhub/runs/542600369?check_suite_focus=true Version on AMO (currently in review):

amo
notlmn commented 4 years ago

🎉 Thank you @fregante.