azukaar/GuPM

Automate releases

Opened this issue · 8 comments

Needs #9, and a github-release provider

I would like a slightly different solution for automatic releases.

It would be better to release a new version on every GitHub release. This would be better for developers because they would only need to create GitHub release and the package will be automatically released to correct package managers.

@filips123 do you mean like a hook on github releases to publish to other sources?

Yes, something like this. Or Travis CI build that runs on GitHub releases.

Not sure if that's possible, but it's definitely a good idea in case you want to support multiple source easily.
Alternatively you could set your CI to run multiple "publish" every commit on master :

g publish
g publish -p github-release
g publish -p npm

GitHub hooks would be harder to do because it would require external API service. But it would be easier for developers.
with

Publishing with CI on GitHub releases is possible with Travis CI on: tags: true:

deploy:
  provider: script
  script: g publish
  on:
    tags: true

@azukaar Also, what does g publish do? Does it publish to all providers? If it doesn't, there should be support for that.

g publish only publish using the default provider.

You can change that by adding to your gupm.json :

cli: {
 defaultProviders: {
   publish: yourProvider
 }
}

That is said you can't set an array or "all" in here.

It would be a good idea to support arrays in there now that you mention it! thanks for that. Publishing to all providers tho seems a bit counter-productive since you probably don't use all your installed providers in all projets

since you probably don't use all your installed providers in all projets

What about publishing to all used providers?

What about publishing to all used providers?

Need to think about it. Some Providers won't even support publishing so I'm not quite sure