github-release-plugin icon indicating copy to clipboard operation
github-release-plugin copied to clipboard

Unable to Skip Snapshots

Open adamretter opened this issue 4 years ago • 3 comments

The problem we are facing is that this plugin runs for both -SNAPSHOT versions and release versions.

We build and publish development snapshots frequently to our Maven repo but we do not want to upload those to GitHub releases. We only want to upload final versions to GitHub releases. I can work around this by placing this in a non-active profile and passing a flag for releases, but an option to skip SNAPSHOT versions would greatly simplify things.

...or just a -Dgithub.release.skip=true flag would also be enough, and we could set this when we do the SNAPSHOT builds.

adamretter avatar Jun 25 '21 14:06 adamretter

I'd say the most straight forward way is to bind the execution to a phase you only run in release and as you mentioned, a profile works too of course. Not sure it really needs another flag for that

jutzig avatar Jun 25 '21 14:06 jutzig

@jutzig The plugin is bound to our deploy phase.

This is used eventually by both:

  1. our snapshot publish process mvn verify && mvn deploy
  2. our release process -mvn release:prepare && mvn release:perform

I don't think there is a suitable phase that is distinct to one of the above but not the other.

adamretter avatar Jun 25 '21 14:06 adamretter

It currently deploys a pre-release for non release versions and a release for release versions. If you only want the release, you could e.g. use the site lifecycle with something like deploy-site as the phase, since it's pushing to a public site anyway so to speak. That being said, I'd be OK with a general skip flag (skip snapshot seems too specific to me) if you want to provide a pull request for that.

jutzig avatar Jun 25 '21 15:06 jutzig