Consolidate release into a single workflow#2198
Merged
Merged
Conversation
Combines release-java-provider, release-java-sdk-to-maven-central, and update-docs into one workflow with three sequential jobs so the docs trigger only fires after Maven Central publishing succeeds, and updates the pulumi/docs workflow filename to the renamed pulumi-sdk-java-docs.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4a01b00 to
139de63
Compare
iwahbe
approved these changes
May 20, 2026
Member
iwahbe
left a comment
There was a problem hiding this comment.
Looks a lot better.
I'm worried about making partial retries possible, so it would be really nice if the steps were idempotent.
That said, it's no worse then the old jobs AFAIK.
| git push origin sdk/${{ env.GORELEASER_CURRENT_TAG }} | ||
|
|
||
| publish-maven-central: | ||
| needs: release-provider |
Member
There was a problem hiding this comment.
Otherwise publish-maven-central will skip if release-provider skips, which makes retrying impossible.
Suggested change
| needs: release-provider | |
| needs: release-provider | |
| if: ${{ !failure() && !cancelled() }} |
| gradle-version: 8.14.1 | ||
| - name: Publish Pulumi Java SDK | ||
| run: | | ||
| cd sdk/java && gradle pulumi:publishToSonatype closeAndReleaseSonatypeStagingRepository |
| cd sdk/java && gradle pulumi:publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
|
|
||
| trigger-docs-update: | ||
| needs: [release-provider, publish-maven-central] |
Member
There was a problem hiding this comment.
Suggested change
| needs: [release-provider, publish-maven-central] | |
| needs: publish-maven-central | |
| if: ${{ !failure() && !cancelled() }} |
Adds skip guards so the release workflow can be safely re-run via workflow_dispatch after a mid-flight failure: - release-provider now checks for the sdk/ tag independently rather than gating its push on the main release tag, so a re-run pushes it if a prior run created the release but failed before tagging. - publish-maven-central checks Maven Central for the version before publishing and skips the JDK/Gradle/publish steps if it already exists, since Maven Central rejects re-publishing a version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A job with `needs:` carries an implicit `if: success()`, so a skipped
upstream job (e.g. on a re-run) would cascade-skip every downstream job.
Add `if: ${{ !failure() && !cancelled() }}` to publish-maven-central and
trigger-docs-update so they run unless an upstream job actually failed,
keeping partial retries possible.
Also bump the publish-maven-central checkout from v3 to v5 to match the
other jobs and clear the actionlint "runner too old" warning.
Addresses review feedback on #2198.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
release-java-provider.yml,release-java-sdk-to-maven-central.yml, andupdate-docs.ymlinto a singlerelease.ymlwith three sequential jobs (release-provider→publish-maven-central→trigger-docs-update), so the docs trigger only fires after Maven Central publishing succeeds (fixes the v1.27.0 scenario in v1.27.0 failed to publish to Maven Central #2192).pulumi/docsworkflow filename to the renamedpulumi-sdk-java-docs.yml(the priorpulumi-java-sdk.ymlwas deleted, which caused the v1.28.0 docs trigger to fail with HTTP 422 in run 26110531106).pulumictl+scripts/versions.shhop in the Maven Central job — the version is now passed directly from therelease-providerjob's output asPULUMI_JAVA_SDK_VERSION(vprefix stripped).on:comment documenting the release interface (changie batch <version>→ Release PR → CHANGELOG.md merge fires the workflow).Fixes #2195
Test plan
actionlint .github/workflows/release.yml— only pre-existing info-level warnings remaingh workflow run release.ymlto confirm theCheck if release existsgate short-circuits goreleaser cleanlypulumi/docsPR is opened only after the artifact appears on Maven Central🤖 Generated with Claude Code