Skip to content

feat: split release workflow into prepare and publish#301

Merged
aidandaly24 merged 1 commit into
aws:mainfrom
Hweinstock:main
Mar 9, 2026
Merged

feat: split release workflow into prepare and publish#301
aidandaly24 merged 1 commit into
aws:mainfrom
Hweinstock:main

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available: #282

Description of changes:

Problem

The current release.yml runs version bump, build, approval, and PyPI publish in a single pipeline. The environment approval gate is not tied to PR approval, so the package can be published from an unmerged branch —
meaning main doesn't reflect what's on PyPI, and tags point to the wrong commit.

Solution

Split into two workflows with the PR merge as a hard gate:

  • release-prepare.yml — bumps version, creates release/vX.Y.Z branch, opens PR, validates build. Stops here.
  • release-publish.yml — triggers only when a release/v* PR is merged to main. Builds from main, requires environment approval, then publishes to PyPI, creates tag, and creates GitHub release.

The old release.yml is renamed to legacy-release.yml as a fallback until the new workflows are verified in production.

Testing

Tested on personal fork (Hweinstock/bedrock-agentcore-sdk-python):

  1. Ran release-prepare.yml manually — verified branch creation, PR creation, and build validation
  2. Merged the release PR — verified release-publish.yml triggered automatically via the pull_request closure.
  3. Ran a dry-run publish by manually skipping PyPI steps — verified build, approval gate, tag creation, and GitHub release all work correctly
  4. PyPI publish fails without token (expected on fork)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter

codecov-commenter commented Mar 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@328acba). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #301   +/-   ##
=======================================
  Coverage        ?   91.09%           
=======================================
  Files           ?       35           
  Lines           ?     3741           
  Branches        ?      566           
=======================================
  Hits            ?     3408           
  Misses          ?      182           
  Partials        ?      151           
Flag Coverage Δ
unittests 91.09% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Hweinstock Hweinstock marked this pull request as ready for review March 9, 2026 16:07
@Hweinstock Hweinstock requested a review from a team March 9, 2026 16:07

@aidandaly24 aidandaly24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved

@aidandaly24 aidandaly24 merged commit 17e1357 into aws:main Mar 9, 2026
22 of 25 checks passed
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.

4 participants