[feat] Automate brownfield gradle plugin releases#351
Open
adamTrz wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR automates Maven Central publication for the Brownfield Gradle Plugin and removes the manual local-zip upload process.
It adds:
brownfield-gradle-plugin/v*tags andworkflow_dispatchWhy
The plugin was previously published manually by signing and publishing to
mavenLocal(), zipping thecom/subtree, and uploading it manually to Maven Central. That flow was slow, error-prone, and had no release-notes automation.Impact
Maintainers can now:
workflow_dispatchdry run that generates notes and stages Maven artifacts without publishinggradle-plugins/react/brownfield/gradle.propertiesDevelopers 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.tsnode --test --experimental-strip-types scripts/__tests__/generate-brownfield-gradle-plugin-release-notes.test.tsyarn brownfield:plugin:version:checkyarn brownfield:plugin:release-notes --version 1.1.0 --ref HEAD --output /private/tmp/bgp-release-notes.mdruby -e 'require "yaml"; YAML.load_file(".github/workflows/release-brownfield-gradle-plugin.yml"); YAML.load_file("jreleaser.yml"); puts "yaml ok"'git diff --checkcd gradle-plugins/react && ./gradlew :brownfield:publishMavenLocalPublicationToReleaseStagingRepository -PSkipSigning=trueyarn brownfield:plugin:publish:local:signedcd gradle-plugins/react && ./gradlew :brownfield:publishMavenLocalPublicationToReleaseStagingRepository.ascsignatures for jar, sources jar, javadoc jar, module metadata, and pomtypecheck,lint,commitlintPassed remotely before removing the temporary PR-only trigger used for pre-merge validation:
26442399021on PR#351Validate release inputs and stage artifactspassedPublish Brownfield Gradle Pluginwas skipped intentionallybrownfield-gradle-plugin-release-notesbrownfield-gradle-plugin-staging-repoStill not executed remotely:
workflow_dispatchdry run after merge tomain