nestdotland/eggs

Optional Additional Feature to simplify "multiple registry" module publishing

Closed this issue · 4 comments

I think it is already great to have "eggs publish" + the GitHub Action for simple publishing to nest.land

I'm just wondering whether it would be an additional boost if we added the option to publish in the deno.land style via webhooks / releases.

Background: Most module developers will imo publish on deno.land PLUS on nest.land ...

Perhaps Luca, Ryan and William would even consider adding an optional hint here - see screenshot:
Screen Shot 2020-09-12 at 6 26 13 PM

The hint could look like. If you want to additionally publish your module on nest.land add another webhook named:
...

An even simpler solution could be that https://github.com/denoland/deno_registry2 automatically publishes on nest.land if

there is an egg.json (which contains a version number which does not exist on nest.land yet)

Adding webhook based publishing is a great idea! (It would be completely optional)

Although this would require a complete rewrite of the exisiting module upload algorithm in order to accept GitHub's webhook delivery and clone the repo and publish it.

Another concern on webhooks will be, is the user willing to put their api key as part of the webhook payload? i.e. giving a third party (in this case GitHub) their api key.

PS: we've explicitly specified in the documentation to not share api keys to any 3rd party source (that might cause permanent damage to owner's modules)

An even simpler solution could be that https://github.com/denoland/deno_registry2 automatically publishes on nest.land if
there is an egg.json (which contains a version number which does not exist on nest.land yet

That won't be easy to achieve as publishing a module demands api key of the owner. If deno.land/x were to implement this they'd have to collect and store user's api key (or username and password)

For automating nest.land + deno.land/x publishing when a new release is published --> eggs-ci is the way to go :)

t8 commented

I think that a complete rewrite of the module uploading mechanism is unnecessary because of our use of an API key. I think that CI is still the best way to accomplish automated publishing. I do think it is an interesting idea, but this isn't something we shouldn't focus on for the foreseeable future.

@littledivy & @t8 I guess the following will do the job as soon as eggs@0.3.0 is available.
https://github.com/michael-spengler/cicd/blob/main/.github/workflows/publish-to-nest.land.yml#L17
on release created seems key - as people anyhow create a release to publish to deno.