setup
CommandSet up rr for a project - creates configs, verifies SSH connectivity, tests remote execution, and ensures dependencies are…
Automates the full release workflow: PR creation, merge, changelog update, and tagging. GoReleaser creates the GitHub release from the tag.
> /plugin marketplace add rileyhilliard/rr> /plugin install rr@rr
Automates the full release workflow: PR creation, merge, changelog update, and tagging. GoReleaser creates the GitHub release from the tag.
Before starting, verify:
1. **Working directory state**: Check for uncommitted changes
git status --porcelain
2. **Branch state**: Determine current branch and unpushed commits
git branch --show-current git log origin/main..HEAD --oneline 2>/dev/null || git log origin/$(git branch --show-current)..HEAD --oneline
3. **Get latest tags for version calculation**
git tag --sort=-v:refname | head -5
4. **Verify tests pass** (skip if user explicitly says to skip)
make test
If on main with unpushed commits:
# Create feature branch from commit message
BRANCH_NAME=$(git log -1 --format=%s | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-50)
git checkout -b "release/${BRANCH_NAME}"
git push -u origin "release/${BRANCH_NAME}"Create PR:
# Get commit message for PR title TITLE=$(git log -1 --format=%s) gh pr create --title "$TITLE" --body "$(cat <<'EOF' ## Summary Auto-generated release PR. ## Changes See commit history for details. EOF )"
# Get PR number from current branch PR_NUMBER=$(gh pr view --json number -q .number) gh pr merge $PR_NUMBER --squash --delete-branch
If merge fails, try rebase:
gh pr merge $PR_NUMBER --rebase --delete-branch
git checkout main git fetch origin git reset --hard origin/main
Parse current version and bump accordingly:
LATEST_TAG=$(git tag --sort=-v:refname | head -1) # Parse and increment based on $ARGUMENTS or default to patch
Write the changelog before tagging, so the tagged commit includes its own entry.
Read existing changelog and insert new version entry at the top (after header). If an `## [Unreleased]` section exists, rename it to the new version instead of writing the entry from scratch.
Get changes for this version:
git log $PREVIOUS_TAG..HEAD --format="%s" --reverse
Categorize commits by conventional commit type:
Insert new section following Keep a Changelog format:
## [$VERSION] - $DATE ### Added - New features... ### Fixed - Bug fixes... ### Changed - Other changes...
Breaking changes also need an entry in `docs/MIGRATION.md`.
**Important**: Most repos have branch protection rules. Always create a PR for the changelog instead of pushing directly to main.
# Create changelog branch git checkout -b "docs/changelog-$NEW_TAG" git add CHANGELOG.md git commit -m "docs: update changelog for $NEW_TAG" git push -u origin "docs/changelog-$NEW_TAG" # Create and merge PR gh pr create --title "docs: update changelog for $NEW_TAG" --body "Update CHANGELOG.md for $NEW_TAG release." PR_NUMBER=$(gh pr view --json number -q .number) gh pr merge $PR_NUMBER --squash --delete-branch # Sync local main git checkout main git fetch origin git reset --hard origin/main
Tag main after the changelog PR has merged:
COMMIT_MSG=$(git log -1 --format=%s) git tag -a $NEW_TAG -m "$COMMIT_MSG" git push origin $NEW_TAG
Don't run `gh release create`. Pushing a `v*` tag triggers `.github/workflows/release.yml`, and GoReleaser creates the GitHub release, uploads the binaries, and publishes the Homebrew cask. A manual `gh release create` for the same tag collides with it.
Watch the workflow and get the release URL once it finishes. GitHub can take a few seconds to register the run, and until then the newest run is the previous release, so wait for the run whose `headBranch` is the new tag:
RUN_ID=""
for _ in $(seq 1 30); do
RUN_ID=$(gh run list --workflow=release.yml --limit 10 --json databaseId,headBranch \
-q ".[] | select(.headBranch == \"$NEW_TAG\") | .databaseId" | head -1)
[ -n "$RUN_ID" ] && break
sleep 5
done
gh run watch "$RUN_ID" --exit-status
gh release view $NEW_TAG --json url -q .urlOn success, report:
/merge-release # patch bump (default) /merge-release patch # explicit patch bump /merge-release minor # minor version bump /merge-release major # major version bump
Run your test suite on dedicated machines instead of your laptop, split across as many hosts as you have. rr syncs your working tree to one or more remote machines over rsync and SSH, runs a command there, and streams the output back.
Set up rr for a project - creates configs, verifies SSH connectivity, tests remote execution, and ensures dependencies are…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.