Skip to content

feat: sign release tags when git signing is configured#5

Merged
outofcoffee merged 1 commit intomainfrom
claude/sign-tags-when-enabled-6o2Yj
Apr 20, 2026
Merged

feat: sign release tags when git signing is configured#5
outofcoffee merged 1 commit intomainfrom
claude/sign-tags-when-enabled-6o2Yj

Conversation

@outofcoffee
Copy link
Copy Markdown
Collaborator

@outofcoffee outofcoffee commented Apr 20, 2026

Adds support for GPG/SSH-signed annotated tags when the repository has tag signing enabled in git config.

Summary

  • TagRelease() now checks for tag signing configuration before creating a tag
  • New isTagSigningEnabled() checks tag.gpgSign and tag.forceSignAnnotated across all git config scopes
  • New createSignedTag() delegates to git tag -s rather than go-git, enabling proper GPG/SSH key lookup and passphrase prompting
  • Lightweight tag creation is unchanged when signing is not configured

Implementation details

Signed tag creation deliberately bypasses the go-git library and shells out to git tag -s. go-git does not support GPG or SSH signing, so delegating to the CLI is the only way to correctly handle key resolution and interactive passphrase entry. Error handling distinguishes between an unset config key (exit code 1, silently skipped) and a real config read failure.

When tag.gpgSign or tag.forceSignAnnotated is set in any git config scope,
TagRelease now creates an annotated signed tag by delegating to the git CLI,
which handles key lookup and passphrase prompts.
@outofcoffee outofcoffee changed the title Support GPG-signed tags when git signing is configured feat: sign release tags when git signing is configured Apr 20, 2026
@outofcoffee outofcoffee self-assigned this Apr 20, 2026
@outofcoffee outofcoffee merged commit a7be038 into main Apr 20, 2026
1 check passed
@outofcoffee outofcoffee deleted the claude/sign-tags-when-enabled-6o2Yj branch April 20, 2026 08:33
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