Skip to content

Fix Java release workflow deploy credentials setup#75

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Closed

Fix Java release workflow deploy credentials setup#75
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The Java release workflow was failing in the build job during mvn deploy because the Sonatype Central publishing plugin could not resolve the central server configuration from Maven settings. This updates the workflow so Maven publishing settings are regenerated immediately before the release deploy step.

  • Root cause

    • The release workflow reached mvn clean deploy without a valid settings.xml entry for server id central.
    • As a result, the Central publishing plugin failed before upload.
  • Workflow change

    • Add a dedicated actions/setup-java@v4 step right before deploy.
    • Reconfigure:
      • server-id: central
      • server-username: MAVEN_USERNAME
      • server-password: MAVEN_PASSWORD
      • gpg-private-key
      • gpg-passphrase: GPG_PASSPHRASE
  • Effect

    • Ensures the deploy step runs with fresh Maven Central credentials and GPG settings in the runner’s Maven configuration.
    • Keeps the build/generation steps unchanged.
  • Relevant workflow snippet

    - name: Configure Maven Central publishing
      uses: actions/setup-java@v4
      with:
        distribution: 'temurin'
        java-version: '21'
        server-id: central
        server-username: MAVEN_USERNAME
        server-password: MAVEN_PASSWORD
        gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
        gpg-passphrase: GPG_PASSPHRASE

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build Fix Java release workflow deploy credentials setup Jul 2, 2026
Copilot AI requested a review from SundermannC July 2, 2026 11:17
@SundermannC SundermannC closed this Jul 2, 2026
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