Skip to content

Conversation

@mchenani
Copy link
Contributor

@mchenani mchenani commented Oct 24, 2025

Update release workflow to run Kotlin job on 'mc/update-kotlin-gh-action-reverted', set up Java 11, validate Gradle wrappers with v4, and use MAVEN_* env vars for publishing

Adjust GitHub Actions release workflow to add a testing branch trigger, enable npm cache and pass NPM_TOKEN, set explicit Kotlin job permissions, add Java 11 setup, upgrade to actions/setup-gradle@v4 with wrapper validation, fail if no git tags when computing VERSION, and switch publishing credentials to MAVEN_USERNAME, MAVEN_PASSWORD, MAVEN_PROFILE_ID. Update Sonatype config to read MAVEN_* from env. Harden the Kotlin protoc generator script with set -eu and deterministic plugin resolution.

📍Where to Start

Start with the workflow changes in release.yml, focusing on the Gradle setup, tag/version computation, and Maven credential updates.

Changes since #306 opened

  • Updated Kotlin job build configuration in GitHub Actions workflow [0c82770]
  • Added npm dependency caching to Node job in GitHub Actions workflow [0c82770]
  • Relocated Kotlin gRPC plugin JAR installation to /opt/protoc-plugins directory and consolidated Docker build steps [b212bb8]
  • Added --no-daemon flag to Gradle publish command in release workflow [95890b3]
  • Added environment variable verification step to release workflow and modified Gradle publish command flags [6eeef11]
  • Added explanatory comments and warning message to signing configuration in Gradle build [6eeef11]
  • Modified nexusPublishing.repositories.sonatype configuration to add snapshot repository URL and refactor credential handling [edbb611]
  • Added timeout configuration to nexusPublishing settings [edbb611]
  • Refactored version management in the release workflow [0d27bfb]
  • Restructured Gradle build execution in the release workflow [0d27bfb]
  • Removed environment variable verification step from the release workflow [0d27bfb]
  • Migrated Maven publishing configuration from legacy Sonatype OSSRH to Maven Central Portal [d5d739e]
  • Replaced Sonatype Central Portal publisher endpoints with OSSRH Staging API compatibility service URLs [a2538b3]
  • Added transition check retry configuration to nexusPublishing [a2538b3]
  • Removed temporary branch from workflow triggers and made kotlin job unconditional [fc8f7ab]
  • Removed warning messages for missing credentials in build scripts [fc8f7ab]

Macroscope summarized 0e33702.

@mchenani mchenani requested a review from a team as a code owner October 24, 2025 20:24
Changes:
- Use ORG_GRADLE_PROJECT_ env vars for Gradle property injection
- Update workflow to use sonatypeUsername/sonatypePassword
- Update build.gradle to use project.findProperty() instead of System.getenv()
- Add snapshotRepositoryUrl to nexus publishing config
- Add version validation and better error logging
- Add conditional signing to support local builds

This fixes the 401 Unauthorized error when publishing to Sonatype.
The gradle-nexus-publish-plugin requires credentials as Gradle project
properties, not custom environment variables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@mchenani mchenani merged commit ac2007c into main Dec 1, 2025
7 checks passed
@mchenani mchenani deleted the mc/update-kotlin-gh-action-reverted branch December 1, 2025 21:27
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.

3 participants