Skip to content

Conversation

devcrocod
Copy link
Contributor

Add a new function for signing publications

Motivation and Context

In the latest release build, the artifact signing tasks were not included

Breaking Changes

no

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the publication signing configuration by extracting signing logic into a dedicated function and updating the signing mechanism to use the MavenPublishBaseExtension API.

  • Extracts signing configuration into a reusable configureSigning function
  • Replaces direct signing API usage with MavenPublishBaseExtension methods
  • Removes unnecessary publishing and mavenLocal() repository configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +57 to +58
mavenPublishing.signAllPublications()
signing.useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
Copy link

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of operations is incorrect. signing.useInMemoryPgpKeys() should be called before mavenPublishing.signAllPublications() to ensure the signing configuration is properly set up before attempting to sign publications.

Suggested change
mavenPublishing.signAllPublications()
signing.useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
signing.useInMemoryPgpKeys(signingKey.get(), signingPassphrase.get())
mavenPublishing.signAllPublications()

Copilot uses AI. Check for mistakes.

@devcrocod devcrocod merged commit b1e9871 into main Sep 19, 2025
4 checks passed
@devcrocod devcrocod deleted the devcrocod/sign-artifacts branch September 19, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants