Skip to content

[feat] Automate brownfield gradle plugin releases#351

Open
adamTrz wants to merge 4 commits into
mainfrom
codex-brownfield-gradle-plugin-release-automation
Open

[feat] Automate brownfield gradle plugin releases#351
adamTrz wants to merge 4 commits into
mainfrom
codex-brownfield-gradle-plugin-release-automation

Conversation

@adamTrz
Copy link
Copy Markdown
Collaborator

@adamTrz adamTrz commented May 26, 2026

Summary

This PR automates Maven Central publication for the Brownfield Gradle Plugin and removes the manual local-zip upload process.

It adds:

  • a dedicated GitHub Actions workflow triggered by brownfield-gradle-plugin/v* tags and workflow_dispatch
  • repo-root JReleaser configuration for GitHub release creation and Maven Central publication
  • a plugin version sync/check script for release-related consumers
  • a plugin-scoped release notes generator based on git history
  • updated maintainer publishing documentation

Why

The plugin was previously published manually by signing and publishing to mavenLocal(), zipping the com/ subtree, and uploading it manually to Maven Central. That flow was slow, error-prone, and had no release-notes automation.

Impact

Maintainers can now:

  • publish on a dedicated plugin tag push
  • run a safe workflow_dispatch dry run that generates notes and stages Maven artifacts without publishing
  • rely on one source of truth for the plugin version in gradle-plugins/react/brownfield/gradle.properties

Developers keep the existing local snapshot path for CI and local Android testing via mavenLocal().

Validation

Validated in an isolated worktree on top of origin/main.

Passed locally:

  • node --test --experimental-strip-types scripts/__tests__/sync-brownfield-gradle-plugin-version.test.ts
  • node --test --experimental-strip-types scripts/__tests__/generate-brownfield-gradle-plugin-release-notes.test.ts
  • yarn brownfield:plugin:version:check
  • yarn brownfield:plugin:release-notes --version 1.1.0 --ref HEAD --output /private/tmp/bgp-release-notes.md
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release-brownfield-gradle-plugin.yml"); YAML.load_file("jreleaser.yml"); puts "yaml ok"'
  • git diff --check
  • cd gradle-plugins/react && ./gradlew :brownfield:publishMavenLocalPublicationToReleaseStagingRepository -PSkipSigning=true
  • local signed publish to Maven Local succeeded: yarn brownfield:plugin:publish:local:signed
  • local signed release staging succeeded: cd gradle-plugins/react && ./gradlew :brownfield:publishMavenLocalPublicationToReleaseStagingRepository
  • staged release artifacts include .asc signatures for jar, sources jar, javadoc jar, module metadata, and pom
  • repo hooks on commit: typecheck, lint, commitlint

Passed remotely before removing the temporary PR-only trigger used for pre-merge validation:

  • GitHub Actions run 26442399021 on PR #351
  • Validate release inputs and stage artifacts passed
  • Publish Brownfield Gradle Plugin was skipped intentionally
  • artifacts uploaded successfully:
    • brownfield-gradle-plugin-release-notes
    • brownfield-gradle-plugin-staging-repo

Still not executed remotely:

  • GitHub Actions workflow_dispatch dry run after merge to main
  • JReleaser publish path against GitHub/Maven Central services

@adamTrz adamTrz changed the title [codex] Automate brownfield gradle plugin releases [feat] Automate brownfield gradle plugin releases May 26, 2026
@adamTrz adamTrz marked this pull request as ready for review May 27, 2026 07:52
@adamTrz adamTrz requested review from artus9033 and hurali97 and removed request for artus9033 May 27, 2026 07:52
@artus9033 artus9033 requested a review from Copilot May 29, 2026 12:41
Copy link
Copy Markdown
Contributor

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 introduces an automated release pipeline for the Brownfield Gradle Plugin, moving Maven Central publication and GitHub release creation into a dedicated GitHub Actions workflow powered by JReleaser, and replacing prior manual publishing steps with scripted version syncing and release-notes generation.

Changes:

  • Add a tag-/dispatch-triggered GitHub Actions workflow to stage artifacts, generate release notes, and run JReleaser for Maven Central + GitHub release.
  • Add repo-root JReleaser configuration for signing and deploying the staged Maven repository.
  • Add Node scripts + tests to (1) sync/check plugin version references and (2) generate plugin-scoped release notes from git history.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/release-brownfield-gradle-plugin.yml New release workflow to validate inputs, stage artifacts, upload artifacts, and publish via JReleaser.
jreleaser.yml JReleaser config for GitHub release creation, signing, and Maven Central deploy using the staged repository.
scripts/sync-brownfield-gradle-plugin-version.ts New script to sync/check embedded plugin version references from gradle.properties.
scripts/generate-brownfield-gradle-plugin-release-notes.ts New script to generate plugin-scoped release notes by collecting commits affecting relevant paths.
scripts/__tests__/sync-brownfield-gradle-plugin-version.test.ts Tests for version sync/check behavior and failure modes.
scripts/__tests__/generate-brownfield-gradle-plugin-release-notes.test.ts Tests for tag selection and release-notes rendering/grouping.
gradle-plugins/react/PUBLISHING.md Updated maintainer docs describing the new automated release flow and required secrets.
gradle-plugins/react/README.md Updated plugin README with install snippets and link to publishing docs.
docs/docs/docs/getting-started/android.mdx Updated integration docs to reference the plugin dependency and plugin id.
gradle-plugins/react/brownfield/build.gradle.kts Adds a staging repository directory used by the workflow/JReleaser deploy path.
package.json Adds yarn scripts for version check/sync and release-notes generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +161 to +163
if (process.argv[1] === __filename) {
main();
}
Comment on lines +242 to +244
if (process.argv[1] === __filename) {
main();
}
Comment on lines +161 to +163
if (process.argv[1] === __filename) {
main();
}
Comment on lines +242 to +244
if (process.argv[1] === __filename) {
main();
}
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