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

Add option to skip publication or executing custom task

Open twobiers opened this issue 4 years ago • 3 comments

I don't want to publish an java artifact and just want the plugin to bump the project version in my case. I know this might sound dumb using this plugin then, but it was the quickest solution to me. I'm currently thinking about developing an own plugin that is capable of bumping versions stored in different file formats which would be a cleaner solution but might conflict with other plugin executions.

However, as of now I'm bypassing the publication by registering a dummy task.

task publish(type: DefaultTask) {
	group = 'publish'
	description = 'Dummy publish to pass the verification phase of the gradle-semantic-release-plugin'
}

I wonder what you think about adding an option that would simply skip the publication. As of writing this, another option came to my mind: Maybe it would be nice to add an option that one can specify the task that should be executed for publication. Here is a quick example:

{
  "release": {
    "branches": [
      "main"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      [
        "gradle-semantic-release-plugin",
        {
          "skipPublication": true,
          "publicationTask": "jib"
        }
      ]
    ]
  }
}

twobiers avatar Nov 28 '21 11:11 twobiers

Maybe it would be nice to add an option that one can specify the task that should be executed for publication

It seems very nice. Currently we only have a 'smart' way which detects necessary publication tasks, but this feature will help users who need to handle corner cases.

KengoTODA avatar Nov 30 '21 01:11 KengoTODA

Something of a not-very-corner case: I'm writing a spring boot application that's going to be deployed inside a docker image, and they have a handy bootBuildImage task that builds the image....

Clockwork-Muse avatar Sep 21 '23 23:09 Clockwork-Muse

This feature could be interesting. As the npm plugin, can we imagine an option to skip the publish step ? cf npmPublish in this page https://github.com/semantic-release/npm?tab=readme-ov-file#options

jeanphi-baconnais avatar Aug 29 '24 15:08 jeanphi-baconnais