Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Jan 13, 2026

🎯 Summary

This PR fixes Java and Go package publishing issues and ensures all CI/CD workflows are properly configured and working.

Fixes #192

🔍 Issues Identified

Java Package

  • Publishing Failure: Maven Central publishing was failing with gpg: signing failed: No secret key error
  • Version Mismatch: Java package was at version 0.1.0 while other packages were at 0.13.0
  • Root Cause: The setup-java action's gpg-private-key parameter was not properly importing the GPG key

Go Package

  • Missing Publishing: No publishing workflow existed for Go packages
  • No Versioning: Go modules had no release mechanism or GitHub releases

✅ Changes Implemented

1. Fixed Java Maven Central Publishing

File: .github/workflows/java.yml

  • Removed gpg-private-key and gpg-passphrase parameters from setup-java action
  • Added explicit GPG key import step using gpg --batch --import
  • Added GPG key listing for debugging purposes
  • This ensures the GPG key is properly imported before Maven tries to sign artifacts

Before:

- name: Set up JDK 11
  uses: actions/setup-java@v5
  with:
    gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
    gpg-passphrase: MAVEN_GPG_PASSPHRASE

After:

- name: Set up JDK 11
  uses: actions/setup-java@v5
  with:
    server-id: ossrh
    server-username: MAVEN_USERNAME
    server-password: MAVEN_PASSWORD
- name: Import GPG key
  run: |
    echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
    gpg --list-secret-keys --keyid-format LONG

2. Added Go Package Publishing

File: .github/workflows/go.yml

  • Added publishRelease job that runs after tests pass on main branch
  • Implemented version extraction from Git tags (format: go_X.Y.Z)
  • Defaults to version 0.13.0 for first release (matching other packages)
  • Creates GitHub releases with installation instructions
  • Automatically creates and pushes Git tags for Go modules

Key Features:

  • Checks if release already exists before creating
  • Provides proper Go module installation instructions
  • Links to pkg.go.dev documentation
  • Follows the same pattern as Rust and Python publishing workflows

3. Updated Java Package Version

File: java/pom.xml

  • Updated version from 0.1.0 to 0.13.0 to match other language implementations (Rust and Python)

🧪 Testing

All CI checks are now passing:

  • ✅ Java workflow: build, test (Java 11, 17, 21), format checks
  • ✅ Go workflow: lint, test, build
  • ✅ BOM check

📋 Verification Steps

To verify the fixes work correctly:

  1. Java Publishing: When Java files change and are merged to main, the workflow will:

    • Import the GPG key successfully
    • Check if version 0.13.0 exists on Maven Central
    • Publish if not already published
    • Create GitHub release with tag java_0.13.0
  2. Go Publishing: When Go files change and are merged to main, the workflow will:

    • Extract version (defaults to 0.13.0 for first run)
    • Create Git tag go_0.13.0
    • Push tag to repository
    • Create GitHub release with installation instructions

🔗 Related Workflows

This implementation follows the same patterns as the existing publishing workflows:

  • .github/workflows/rust.yml - Publishes to crates.io
  • .github/workflows/python.yml - Publishes to PyPI

📝 Notes

  • Java: Publishing requires GPG_PRIVATE_KEY, GPG_PASSPHRASE, OSSRH_USERNAME, and OSSRH_TOKEN secrets to be configured
  • Go: Publishing only requires the default GITHUB_TOKEN (automatically available)
  • Go versioning: For future releases, update the version by merging changes to Go files, and the workflow will use the latest go_* tag + 1 or create version 0.13.0 if no tags exist

This PR was created and tested by the AI issue solver

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #192
@konard konard self-assigned this Jan 13, 2026
konard and others added 2 commits January 13, 2026 13:06
- Fixed Java Maven Central publishing by improving GPG key import
  - Moved from setup-java's gpg-private-key parameter to manual import
  - Added explicit GPG key listing for debugging
  - This resolves the "No secret key" error that was causing publishing to fail

- Added Go package publishing workflow
  - Implemented publishRelease job that creates GitHub releases
  - Added automatic Git tag creation for Go modules (format: go_X.Y.Z)
  - Included installation instructions in release notes

- Updated Java package version from 0.1.0 to 0.13.0 to match other language implementations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Make sure Java and Go packages are published and all CI/CD working Fix Java and Go package publishing and CI/CD Jan 13, 2026
@konard konard marked this pull request as ready for review January 13, 2026 12:10
@konard
Copy link
Member Author

konard commented Jan 13, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.643034 USD
  • Calculated by Anthropic: $1.577172 USD
  • Difference: $-1.065861 (-40.33%)
    📎 Log file uploaded as Gist (484KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

Make sure Java and Go packages are published and all CI/CD working

2 participants