Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to skip publication or executing custom task #435

Open
twobiers opened this issue Nov 28, 2021 · 3 comments · May be fixed by #631
Open

Add option to skip publication or executing custom task #435

twobiers opened this issue Nov 28, 2021 · 3 comments · May be fixed by #631
Labels
enhancement New feature or request

Comments

@twobiers
Copy link

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"
        }
      ]
    ]
  }
}
@KengoTODA
Copy link
Owner

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 KengoTODA added the enhancement New feature or request label Nov 30, 2021
@Clockwork-Muse
Copy link

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....

@jeanphi-baconnais
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants