Skip to content

feat: support preview releases from feature branches#905

Merged
tejaskash merged 1 commit intomainfrom
feat/preview-release-workflow
Apr 22, 2026
Merged

feat: support preview releases from feature branches#905
tejaskash merged 1 commit intomainfrom
feat/preview-release-workflow

Conversation

@tejaskash
Copy link
Copy Markdown
Contributor

Summary

  • Release workflow now supports publishing preview versions from non-main branches using the preview npm dist-tag
  • Stable bump types (patch/minor/major) are blocked on non-main branches to prevent accidental overwrites of the latest tag
  • Release PRs target the source branch instead of hardcoded main
  • Publish job no longer gated to main-only — it uses the dynamically determined base branch and dist-tag

Test plan

  • Run release workflow from main with patch — should behave identically to before (dist-tag: latest, PR targets main)
  • Run release workflow from a feature branch with preview — should set dist-tag to preview and PR targets the feature branch
  • Run release workflow from a feature branch with patch — should fail at the metadata step

@tejaskash tejaskash requested a review from a team April 21, 2026 23:39
@github-actions github-actions Bot added the size/s PR size: S label Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Package Tarball

aws-agentcore-0.9.1.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-905-tarball/aws-agentcore-0.9.1.tgz

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 42.44% 7169 / 16891
🔵 Statements 41.84% 7602 / 18165
🔵 Functions 40.14% 1273 / 3171
🔵 Branches 41.03% 4803 / 11706
Generated in workflow #1875 for commit 2d6880e by the Vitest Coverage Report Action

Comment thread .github/workflows/release.yml Outdated
The release workflow was hardcoded to only publish from main with the
`latest` npm dist-tag. This made it impossible to publish prerelease
versions from feature branches.

Now when the workflow runs from a non-main branch, it sets the npm
dist-tag to `preview` and targets the source branch for the release PR.
Stable bump types (patch, minor, major) are blocked on non-main branches
to prevent accidental overwrites of the `latest` tag.
@tejaskash tejaskash force-pushed the feat/preview-release-workflow branch from ba2261b to 2d6880e Compare April 22, 2026 01:04
@github-actions github-actions Bot removed the size/s PR size: S label Apr 22, 2026
@github-actions github-actions Bot added the size/s PR size: S label Apr 22, 2026
@tejaskash
Copy link
Copy Markdown
Contributor Author

Rebased on latest main (which merged #847 removing preview/preview-major bump types). The guard now only accepts prerelease from non-main branches, matching the current dropdown options.

@notgitika notgitika self-requested a review April 22, 2026 01:24
Copy link
Copy Markdown
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

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

LGTM

@tejaskash tejaskash merged commit 1a93f92 into main Apr 22, 2026
23 checks passed
@tejaskash tejaskash deleted the feat/preview-release-workflow branch April 22, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants