| name | smaqit.release-git-pr |
| description | Execute git operations for PR-based releases (commit, push, and enforce the post-merge automation PR title) |
| metadata | {"version":"0.3.0"} |
Release Git PR
Execute git operations required for PR-based releases: stage changes, commit to PR branch, and push via {{PUSH_METHOD_SUMMARY}}.
When to use this skill
Use this skill for PR-based releases (running in CI/CD or agent workflow) after all files have been prepared. This skill:
- Commits release preparation changes to PR branch
- Pushes changes using {{PUSH_METHOD_SUMMARY}}
- Documents post-merge tag creation instructions
Do NOT use this skill for local releases - use release-git-local instead.
How to execute
Step 1: Stage Changes
Stage CHANGELOG.md and any confirmed version files:
git add CHANGELOG.md
If version files were updated:
git add package.json pyproject.toml
Verify staged changes:
git --no-pager diff --cached --name-only
Step 2: Commit to PR Branch
Create commit with release preparation message:
git commit -m "Prepare release vX.Y.Z"
Use "Prepare release" not "Release" because the actual release happens after PR merge to main.
Verify commit was created:
git --no-pager log -1 --oneline
{{PUSH_STEP}}
Step 4: Verify and Enforce PR Title for Post-Merge Automation
CRITICAL: This step is not optional. A wrong PR title causes the post-merge release workflow to skip all jobs silently.
Check the current PR title:
gh pr view --json title -q .title
The PR title MUST match one of these patterns:
Prepare release vX.Y.Z
Release vX.Y.Z
If the title does NOT match, update it immediately:
gh pr edit --title "Prepare release vX.Y.Z"
Common failure patterns to watch for:
- "Prepare release metadata for v1.0.4" ❌ (extra words before version)
- "fix: release prep v1.0.4" ❌ (wrong format)
- "chore: prepare v1.0.4 release" ❌ (wrong format)
- "Prepare release v1.0.4" ✅
- "Release v1.0.4" ✅
Post-merge workflow automatically:
- Creates and pushes git tag
vX.Y.Z
- Builds binaries for all platforms
- Creates GitHub Release with binaries and changelog
No manual intervention required!
Document in PR description:
## Post-Merge Automation
When this PR is merged to `main`, the post-merge workflow will automatically:
✅ Create git tag `vX.Y.Z`
✅ Build binaries for Linux, macOS, Windows (amd64/arm64)
✅ Publish GitHub Release with binaries and changelog
Workflow: `.github/workflows/post-merge-release.yml`
Output
Provide a summary of PR operations:
success: true
commit_sha: abc123def456
pr_updated: true
pr_branch: feature/release-v0.3.0
pr_title: "Prepare release vX.Y.Z"
post_merge_automation: true
Output fields:
success: Boolean indicating all operations completed
commit_sha: SHA of the release preparation commit
pr_updated: Boolean indicating PR was updated successfully
pr_branch: The feature branch containing release changes
pr_title: The PR title that triggers post-merge automation
post_merge_automation: Boolean indicating workflow will handle release
Error Handling
| Error | Likely Cause | Suggested Action |
|---|
nothing to commit | Files unchanged or not staged | Verify changes were made and staged correctly |
| {{PUSH_FAILURE_ROW}} | | |
| Already on main branch | Wrong workflow used | Use release-git-local skill for local releases |
Critical Differences from release-git-local
| Aspect | release-git-local | release-git-pr |
|---|
| Branch | main | Feature/PR branch |
| Commit message | "Release vX.Y.Z" | "Prepare release vX.Y.Z" |
| Tag creation | ✅ Yes, immediately | ❌ No, after merge to main |
| Push method | git push directly | {{PUSH_METHOD_SUMMARY}} |
| Git credentials | User's local credentials | {{PUSH_CREDENTIAL_SOURCE}} |
| When to use | Developer's local machine | CI/CD or agent workflow |
Notes
- This skill is for PR-based release workflows only
- Tags are intentionally NOT created on PR branches
- Complete release automation happens via post-merge workflow after PR merge
- Push authentication is handled by {{PUSH_METHOD_SUMMARY}}
- PR title must match pattern for post-merge automation to trigger
- Release completes automatically after PR merge: tag, builds, GitHub Release
- See
.github/workflows/post-merge-release.yml for workflow details