gradle-release icon indicating copy to clipboard operation
gradle-release copied to clipboard

Additional hook between createReleaseTag and updateVersion

Open Vampire opened this issue 5 years ago • 3 comments

If you want to automatically create a GitHub release (in non-draft state), the tag needs to be created and pushed already, or GitHub will tag the current state of the branch automatically which is not what you want.

To do this, you must do the GitHub release creation after the createReleaseTag task was executed (so that the tag is present on GitHub), but before the updateVersion task was executed (or the project.version is not the released one anymore and you cannot use the tag name calculation properly.

Also for this maybe the preTagCommit and createReleaseTag tasks should be moved into the inner-most GradleBuild call, so that the project version can properly be used without the need for taking precaution to not evaluate it too early.

Vampire avatar Aug 25 '19 23:08 Vampire

Can't we use the afterReleaseBuild task for this? It is called before the snapshot is added and is executed when the project has the release version.

Hillkorn avatar Sep 02 '19 05:09 Hillkorn

Nope, the point is, that the tag must be present on GitHub, which it is not, it is not even created.

Vampire avatar Sep 02 '19 06:09 Vampire

Ah ok got it :)

Hillkorn avatar Sep 02 '19 08:09 Hillkorn