Skip to content

Consolidate release into a single workflow#2198

Merged
jkodroff merged 3 commits into
mainfrom
jkodroff/fix-release-workflow
May 21, 2026
Merged

Consolidate release into a single workflow#2198
jkodroff merged 3 commits into
mainfrom
jkodroff/fix-release-workflow

Conversation

@jkodroff
Copy link
Copy Markdown
Member

Summary

  • Collapses release-java-provider.yml, release-java-sdk-to-maven-central.yml, and update-docs.yml into a single release.yml with three sequential jobs (release-providerpublish-maven-centraltrigger-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).
  • Updates the pulumi/docs workflow filename to the renamed pulumi-sdk-java-docs.yml (the prior pulumi-java-sdk.yml was deleted, which caused the v1.28.0 docs trigger to fail with HTTP 422 in run 26110531106).
  • Drops the pulumictl + scripts/versions.sh hop in the Maven Central job — the version is now passed directly from the release-provider job's output as PULUMI_JAVA_SDK_VERSION (v prefix stripped).
  • Adds an 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 remain
  • After merge, manually invoke via gh workflow run release.yml to confirm the Check if release exists gate short-circuits goreleaser cleanly
  • On the next real release: confirm jobs run sequentially and the pulumi/docs PR is opened only after the artifact appears on Maven Central

🤖 Generated with Claude Code

@jkodroff jkodroff requested a review from a team as a code owner May 19, 2026 17:25
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>
@jkodroff jkodroff force-pushed the jkodroff/fix-release-workflow branch from 4a01b00 to 139de63 Compare May 19, 2026 17:26
@jkodroff jkodroff added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label May 19, 2026
Copy link
Copy Markdown
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this idempotent?

cd sdk/java && gradle pulumi:publishToSonatype closeAndReleaseSonatypeStagingRepository

trigger-docs-update:
needs: [release-provider, publish-maven-central]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
needs: [release-provider, publish-maven-central]
needs: publish-maven-central
if: ${{ !failure() && !cancelled() }}

jkodroff and others added 2 commits May 20, 2026 09:44
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>
@jkodroff jkodroff enabled auto-merge (squash) May 20, 2026 14:21
@jkodroff jkodroff merged commit b3992ac into main May 21, 2026
54 of 58 checks passed
@jkodroff jkodroff deleted the jkodroff/fix-release-workflow branch May 21, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/no-changelog-required This issue doesn't require a CHANGELOG update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release workflow needs to be restructured

2 participants