devonfw/homebrew-IDEasy#4: publish the Homebrew formula as part of the release - #2223
devonfw/homebrew-IDEasy#4: publish the Homebrew formula as part of the release#2223maybeec wants to merge 1 commit into
Conversation
…e release Homebrew is a primary distribution channel, so the formula is published synchronously by this workflow instead of by a decoupled follow-up automation whose failures nobody notices. The tap has been stuck at 2026.04.002 since May because that automation silently produced unmergeable pull requests. - resolve the release version once in a dedicated job and pass it to every downstream job. .mvn/maven.config is rewritten twice during the release, so re-deriving the version later resolved a different value depending on the point in time, and the same value was called next_version in one step and current_version in the next. - wait until the deployment is published instead of merely validated. mvn deploy returned as soon as Central had validated the bundle, so the GitHub release notes already linked to Maven Central URLs that were not resolvable yet. - replace the nexus-staging configuration for the retired OSSRH host s01.oss.sonatype.org with the central-publishing plugin that actually performs the deployment. - compute the formula checksums from the archives that were just deployed and verify that Central serves the same bytes. - render, audit, install and test the formula on macOS before pushing it to the tap, so the tap is never left in a broken state. - add the missing linux-arm64 download to the release notes.
Coverage Report for CI Build 30362263440Coverage decreased (-0.009%) to 72.593%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
Note for the reviewer: what has and has not been executed
What has been verified:
If you want the release-side path exercised before the next release, the Publish formula One deviation worth knowing aboutThe formula was intended to reference |
This PR fixes devonfw/homebrew-IDEasy#4
Homebrew users are stuck on 2026.04.002:
brew upgrade ideasyreports "already installed" becausethe tap has not been updated since May. The tap's own polling automation opened five pull requests
that all carry empty
sha256fields and that nobody merges. That is fixed on the tap side indevonfw/homebrew-IDEasy#8; this PR makes the release actually publish the formula.
Interpretation this PR is based on: Homebrew is a primary distribution channel for IDEasy. A
decoupled post-processing automation running after the release can fail unnoticed — as it did for
three months. So publishing the formula becomes a synchronous part of this workflow: if it cannot be
published, the release run is red.
Implemented changes:
Resolve the release version exactly once.
.mvn/maven.configwas parsed independently inthree places, and it is rewritten twice during the run (to the release version, then to the next
snapshot). The same number was called
next_versioninbuild-nativesandcurrent_versioninthe release step, and anything reading the file afterwards resolves a different version depending
on when it runs. A new
resolve-versionjob publishesrelease_versionandsnapshot_versionasjob outputs, and every downstream job consumes them.
Wait until the deployment is published, not merely validated (precondition for everything
below — see the note at the end).
central-publishing-maven-plugindefaults towaitUntil=validated, somvn deployreturns as soon as Central has validated the bundle. In the2026.07.002 run the GitHub release — whose notes link directly to
repo1.maven.org— was createdseven seconds after validation, well before those URLs resolved. The
deployprofile now setsautoPublish+waitUntil=publishedwithwaitMaxTime=3600.Drop the dead OSSRH configuration. The
deployprofile configurednexus-staging-maven-pluginagainsts01.oss.sonatype.org, which was retired on 2025-06-30. Therelease log confirms it is vestigial: the actual publishing is done by
central-publishing:0.8.0inherited from
com.devonfw:maven-parent. It is replaced by an explicitcentral-publishingconfiguration, keeping
publishingServerId=repositoryso the existingSONATYPE_USERNAME/SONATYPE_PASSWORDcredentials from.mvn/settings.xmlcontinue to apply.Publish the formula from the release. Three new jobs after
release:await-central— waits until all four archives are served byrepo1and verifies thechecksums match the artifacts that were just deployed.
verify-homebrew— renders the formula and runsbrew audit --strict --online,brew installandbrew testonmacos-latestandmacos-15-intel.publish-homebrew— pushes the formula to the tap, only after verification passed, so the tapis never left broken.
Checksums are computed from the archives in
cli/target/that were just deployed — the exact bytesCentral will serve — so nothing is downloaded to build the formula.
Add the missing
linux-arm64download to the release notes. The assembly(
cli/src/main/assembly/release-linux-arm64.xml) has been built and deployed for a while but waslisted nowhere.
The tap is checked out with
ACTION_PUSH_TOKEN, the same secret already used to push todevonfw/ide-urlsinupdate-urls.ymlandupdate-cve.yml. If its scope does not coverdevonfw/homebrew-IDEasy, this is a one-line change to a different secret.Testing instructions
The release workflow only runs on
workflow_dispatch, so the end-to-end path is first exercised bythe next release. What can be checked before that:
resolve-version→build-natives→release→await-central→verify-homebrew→publish-homebrew. No job re-derives the version.mvn -N -Pdeploy validatepasses with the new publishing plugin configuration../wait-for-central.sh 2026.07.002verifies against the real2026.07.002 artifacts, and
render-formula.shrejects the empty-version and empty-checksuminputs that produced the stale bot PRs.
publish-homebrewmust push the new version to the tap, andbrew update && brew upgrade ideasymust upgrade.Checklist for this PR
mvn clean testlocally all tests pass and build is successful (no production code touched;mvn -N -Pdeploy validateverified the POM change)#«issue-id»: «brief summary»(cross-repository form, the issue lives indevonfw/homebrew-IDEasy)In Progressand assigned to youChecklist for tool commandlets
Not applicable — no commandlet is added.
Precondition to be aware of when merging
The
waitUntil=publishedchange is required for the Homebrew jobs (the formula must not bepublished before the URLs it references resolve), but it also changes release timing for everyone:
mvn deploynow blocks until Maven Central reports the deployment as published instead of returningat validation. Publication typically takes on the order of 20 minutes, bounded here by
waitMaxTime=3600; if Central does not publish within that window the release fails loudly insteadof producing release notes pointing at URLs that do not resolve yet.
Merge order: devonfw/homebrew-IDEasy#8 must be merged first — this workflow checks that
repository out and runs
render-formula.shandwait-for-central.shfrom it.