Skip to content

use changesets/action PR flow for releases#149

Merged
LadyBluenotes merged 1 commit into
mainfrom
ci/release-changesets-action-pr-flow
Jun 7, 2026
Merged

use changesets/action PR flow for releases#149
LadyBluenotes merged 1 commit into
mainfrom
ci/release-changesets-action-pr-flow

Conversation

@LadyBluenotes
Copy link
Copy Markdown
Member

@LadyBluenotes LadyBluenotes commented Jun 7, 2026

Update pr workflow

Summary by CodeRabbit

  • Chores
    • Refactored release workflow to use automated changesets-based versioning and publishing, improving reliability and efficiency of package releases.

@LadyBluenotes LadyBluenotes requested a review from a team as a code owner June 7, 2026 22:06
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 7, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The release GitHub Actions workflow migrates from manual versioning and commit-based publishing to automated changesets action. The job-level guard preventing runs on ci: changeset release messages is removed, and the entire publish flow is restructured to delegate versioning and publication decisions to changesets/action.

Changes

Release Workflow Changesets Migration

Layer / File(s) Summary
Job-level guard removal and checkout setup
.github/workflows/release.yml
The release job's conditional that skipped runs on ci: changeset release commits is removed. The checkout step's persist-credentials comment is updated to reflect the changesets action behavior.
Release action refactoring with changesets step
.github/workflows/release.yml
The dist-tag determination step moves before the publish block. The prior "Version Packages," "Commit and Push," and direct "Publish" steps are replaced by a single changesets/action step that performs versioning, publishing, and optional PR creation. The "Create GitHub Release" step now gates on steps.changesets-action.outputs.published instead of commit-based conditions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A workflow reborn, so neat and so clean,
Changesets action now runs the release machine,
No more commit guards, just actions that flow,
Version and publish in one smooth tableau! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete and does not follow the provided template structure with required sections like 'Changes', 'Checklist', and 'Release Impact'. Complete the description by filling in the 'Changes' section with details about the workflow refactoring, check the checklist items, and specify the 'Release Impact' section (whether a changeset was generated or if this is CI-only).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: migrating the release workflow to use the changesets/action PR flow instead of the previous approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-changesets-action-pr-flow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 7, 2026

View your CI Pipeline Execution ↗ for commit f2d3223

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded <1s View ↗
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 3s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-07 22:07:26 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@149

commit: f2d3223

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 67-79: The changesets/action step (id: changesets-action, uses:
changesets/action) is creating GitHub releases by default and duplicates the
separate release script; add the action input createGithubReleases set to false
in the same with: block (e.g., add createGithubReleases: 'false') so
changesets/action will not create releases and only node
scripts/create-github-release.mjs runs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ad699f55-58c1-4058-9a85-5b0f3e87a9d4

📥 Commits

Reviewing files that changed from the base of the PR and between a8e0ea1 and f2d3223.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment on lines +67 to 79
- name: Create Release Pull Request or Publish
id: changesets-action
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
title: 'ci: Version Packages'
commit: 'ci: changeset release'
env:
DIST_TAG_ARG: ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
if: steps.commit.outputs.committed == 'true'
if: steps.changesets-action.outputs.published == 'true'
run: node scripts/create-github-release.mjs ${PRERELEASE_ARG} ${LATEST_ARG}
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant workflow section around the referenced lines
echo "=== .github/workflows/release.yml (lines ~50-110) ==="
nl -ba .github/workflows/release.yml | sed -n '45,115p'

# Show how changesets-action outputs are used elsewhere in the workflow
echo
echo "=== Search for changesets-action outputs usage in release.yml ==="
rg -n "changesets-action|create-github-release|published" .github/workflows/release.yml

# Inspect the create-github-release script to confirm what it does
echo
echo "=== scripts/create-github-release.mjs (lines ~1-220) ==="
nl -ba scripts/create-github-release.mjs | sed -n '1,220p'

# Find the part that creates the GitHub Release (octokit usage / createRelease etc.)
echo
echo "=== Search in create-github-release.mjs for release creation ==="
rg -n "create.*release|releases|octokit|createRelease|POST.*releases|tag_name" scripts/create-github-release.mjs

# Also check if the script is only invoked from this workflow
echo
echo "=== Search repo for create-github-release.mjs invocations ==="
rg -n "scripts/create-github-release\.mjs" .

Repository: TanStack/intent

Length of output: 174


🌐 Web query:

changesets/action createGithubReleases default value behavior

💡 Result:

The createGithubReleases option in the changesets/action is a boolean configuration that determines whether the action will automatically create GitHub releases after a successful publish [1][2]. Its default value is true [1][3]. Key behavioral details include: Automatic Release Creation: When set to its default (true), the action attempts to create a GitHub release following a successful publish event [1][2]. This functionality relies on the publish process to provide the necessary context (e.g., package versions) [4]. Dependency on Publish: The createGithubReleases logic is triggered in conjunction with the publish command [4]. If the action is not configured to publish—or if the publish step does not successfully complete—the GitHub release creation may not occur as expected [4][5]. Permissions: For this feature to function correctly, the workflow requires appropriate permissions, typically configured via GITHUB_TOKEN or a Personal Access Token (PAT) with read-write access to the repository's contents [5]. Behavior when Disabled: When explicitly set to false, the action does not create GitHub releases [1][6]. Users have reported that this setting may also affect git tag behavior, as the action's ability to push tags can be tied to the release creation logic [6].

Citations:


🌐 Web query:

changesets/action outputs published createGithubReleases

💡 Result:

The createGithubReleases input in the official changesets/action is a boolean option used to control whether GitHub releases are automatically created after the publish process completes [1][2][3]. Key details regarding this option include: Default Behavior: The option defaults to true, meaning the action will attempt to create a GitHub release automatically whenever a package is published [1][2][3]. Configuration: To use it, you include it in the with block of your workflow configuration for changesets/action [1][4]. Prerequisites: For GitHub releases to be created, you must ensure that your GitHub Actions workflow has the appropriate permissions (usually by providing the GITHUB_TOKEN in the environment section of the step) [4][5]. If you are using the official changesets/action, it performs this task automatically by default [1][3]. If you require more advanced options—such as aggregating multiple releases into a single GitHub release—you may need to look at community-maintained forks like dotansimha/changesets-action, which offer extended configurations for this setting [5].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== .github/workflows/release.yml (lines 55-110) ==="
awk 'NR>=55 && NR<=110 {printf "%5d:%s\n", NR, $0}' .github/workflows/release.yml

echo
echo "=== Search for create-github-release invocation in release.yml ==="
rg -n "create-github-release\.mjs|steps\.changesets-action\.outputs\.published|changesets/action" .github/workflows/release.yml

echo
echo "=== scripts/create-github-release.mjs (first 220 lines) ==="
awk 'NR>=1 && NR<=220 {printf "%5d:%s\n", NR, $0}' scripts/create-github-release.mjs

echo
echo "=== Search for GitHub release creation in create-github-release.mjs ==="
rg -n "createRelease|repos\.create|POST .*releases|releases|tag_name|octokit" scripts/create-github-release.mjs

echo
echo "=== Search repo for scripts/create-github-release.mjs invocations ==="
rg -n "scripts/create-github-release\.mjs" .

Repository: TanStack/intent

Length of output: 9125


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== scripts/create-github-release.mjs (lines 200-520) ==="
awk 'NR>=200 && NR<=520 {printf "%5d:%s\n", NR, $0}' scripts/create-github-release.mjs

echo
echo "=== Search for GitHub API release creation calls ==="
rg -n "createRelease|repos\\..*releases|releases\\.create|POST .*releases|octokit|actions\\.github|`@octokit`|gh api" scripts/create-github-release.mjs || true

echo
echo "=== Search for createGithubReleases or changesets-action inputs in repo ==="
rg -n "createGithubReleases" .github/workflows scripts || true

echo
echo "=== Search for any other steps that run create-github-release.mjs ==="
rg -n "node scripts/create-github-release\\.mjs" .github/workflows || true

Repository: TanStack/intent

Length of output: 4413


Disable changesets/action GitHub release creation to avoid double release creation.

  • changesets/action creates GitHub releases by default (createGithubReleases defaults to true), and this workflow doesn’t override it.
  • The workflow separately runs node scripts/create-github-release.mjs when steps.changesets-action.outputs.published == 'true'; that script calls gh release create, so the same publish run can attempt to create a release twice (leading to duplicate releases or failures).
Suggested fix
       - name: Create Release Pull Request or Publish
         id: changesets-action
         uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
         with:
           version: pnpm run changeset:version
           publish: pnpm run changeset:publish ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
+          createGithubReleases: false
           title: 'ci: Version Packages'
           commit: 'ci: changeset release'
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Create Release Pull Request or Publish
id: changesets-action
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
title: 'ci: Version Packages'
commit: 'ci: changeset release'
env:
DIST_TAG_ARG: ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
if: steps.commit.outputs.committed == 'true'
if: steps.changesets-action.outputs.published == 'true'
run: node scripts/create-github-release.mjs ${PRERELEASE_ARG} ${LATEST_ARG}
- name: Create Release Pull Request or Publish
id: changesets-action
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish ${{ steps.dist-tag.outputs.tag && format('--tag {0}', steps.dist-tag.outputs.tag) }}
createGithubReleases: false
title: 'ci: Version Packages'
commit: 'ci: changeset release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
if: steps.changesets-action.outputs.published == 'true'
run: node scripts/create-github-release.mjs ${PRERELEASE_ARG} ${LATEST_ARG}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 67 - 79, The changesets/action
step (id: changesets-action, uses: changesets/action) is creating GitHub
releases by default and duplicates the separate release script; add the action
input createGithubReleases set to false in the same with: block (e.g., add
createGithubReleases: 'false') so changesets/action will not create releases and
only node scripts/create-github-release.mjs runs.

@LadyBluenotes LadyBluenotes merged commit f991db3 into main Jun 7, 2026
8 checks passed
@LadyBluenotes LadyBluenotes deleted the ci/release-changesets-action-pr-flow branch June 7, 2026 22:28
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.

2 participants