[ci] standardize release notes format in release commands (#4912)

This commit is contained in:
Christian Byrne
2025-08-11 10:07:29 -07:00
committed by GitHub
parent a1a8d48544
commit d0d13bfe4c
2 changed files with 124 additions and 100 deletions

View File

@@ -210,29 +210,52 @@ echo "Last stable release: $LAST_STABLE"
echo "WARNING: PR #$PR not on main branch!" echo "WARNING: PR #$PR not on main branch!"
done done
``` ```
3. Create comprehensive release notes including: 3. Create standardized release notes using this exact template:
- **Version Change**: Show version bump details
- **Changelog** grouped by type:
- 🚀 **Features** (feat:)
- 🐛 **Bug Fixes** (fix:)
- 💥 **Breaking Changes** (BREAKING CHANGE)
- 📚 **Documentation** (docs:)
- 🔧 **Maintenance** (chore:, refactor:)
- ⬆️ **Dependencies** (deps:, dependency updates)
- **Litegraph Changes** (if version updated):
- 🚀 Features: ${LITEGRAPH_FEATURES}
- 🐛 Bug Fixes: ${LITEGRAPH_FIXES}
- 💥 Breaking Changes: ${LITEGRAPH_BREAKING}
- 🔧 Other Changes: ${LITEGRAPH_OTHER}
- **Other Major Dependencies**: ${OTHER_DEP_CHANGES}
- Include PR numbers and links
- Add issue references (Fixes #123)
4. **Save release notes:**
```bash ```bash
# Save release notes for PR and GitHub release cat > release-notes-${NEW_VERSION}.md << 'EOF'
echo "$RELEASE_NOTES" > release-notes-${NEW_VERSION}.md ## ⚠️ Breaking Changes
<!-- List breaking changes if any, otherwise remove this entire section -->
- Breaking change description (#PR_NUMBER)
---
## What's Changed
### 🚀 Features
<!-- List features here, one per line with PR reference -->
- Feature description (#PR_NUMBER)
### 🐛 Bug Fixes
<!-- List bug fixes here, one per line with PR reference -->
- Bug fix description (#PR_NUMBER)
### 🔧 Maintenance
<!-- List refactoring, chore, and other maintenance items -->
- Maintenance item description (#PR_NUMBER)
### 📚 Documentation
<!-- List documentation changes if any, remove section if empty -->
- Documentation update description (#PR_NUMBER)
### ⬆️ Dependencies
<!-- List dependency updates -->
- Updated dependency from vX.X.X to vY.Y.Y (#PR_NUMBER)
**Full Changelog**: https://github.com/Comfy-Org/ComfyUI_frontend/compare/${BASE_TAG}...v${NEW_VERSION}
EOF
``` ```
5. **CONTENT REVIEW**: Release notes clear and comprehensive with dependency details? 4. **Parse commits and populate template:**
- Group commits by conventional commit type (feat:, fix:, chore:, etc.)
- Extract PR numbers from commit messages
- For breaking changes, analyze if changes affect:
- Public APIs (app object, api module)
- Extension/workspace manager APIs
- Node schema, workflow schema, or other public schemas
- Any other public-facing interfaces
- For dependency updates, list version changes with PR numbers
- Remove empty sections (e.g., if no documentation changes)
- Ensure consistent bullet format: `- Description (#PR_NUMBER)`
5. **CONTENT REVIEW**: Release notes follow standard format?
### Step 9: Create Version Bump PR ### Step 9: Create Version Bump PR
@@ -273,38 +296,12 @@ echo "Workflow triggered. Waiting for PR creation..."
--body-file release-notes-${NEW_VERSION}.md \ --body-file release-notes-${NEW_VERSION}.md \
--label "Release" --label "Release"
``` ```
3. **Add required sections to PR body:** 3. **Update PR with release notes:**
```bash ```bash
# Create PR body with release notes plus required sections # For workflow-created PRs, update the body with our release notes
cat > pr-body.md << EOF gh pr edit ${PR_NUMBER} --body-file release-notes-${NEW_VERSION}.md
${RELEASE_NOTES}
## Breaking Changes
${BREAKING_CHANGES:-None}
## Testing Performed
- ✅ Full test suite (unit, component)
- ✅ TypeScript compilation
- ✅ Linting checks
- ✅ Build verification
- ✅ Security audit
## Distribution Channels
- GitHub Release (with dist.zip)
- PyPI Package (comfyui-frontend-package)
- npm Package (@comfyorg/comfyui-frontend-types)
## Post-Release Tasks
- [ ] Verify all distribution channels
- [ ] Update external documentation
- [ ] Monitor for issues
EOF
``` ```
4. Update PR with enhanced description: 4. **PR REVIEW**: Version bump PR created with standardized release notes?
```bash
gh pr edit ${PR_NUMBER} --body-file pr-body.md
```
5. **PR REVIEW**: Version bump PR created and enhanced correctly?
### Step 10: Critical Release PR Verification ### Step 10: Critical Release PR Verification
@@ -592,55 +589,46 @@ The command implements multiple quality gates:
- Draft release status - Draft release status
- Python package specs require that prereleases use alpha/beta/rc as the preid - Python package specs require that prereleases use alpha/beta/rc as the preid
## Common Issues and Solutions ## Critical Implementation Notes
### Issue: Pre-release Version Confusion When executing this release process, pay attention to these key aspects:
**Problem**: Not sure whether to promote pre-release or create new version
**Solution**:
- Follow semver standards: a prerelease version is followed by a normal release. It should have the same major, minor, and patch versions as the prerelease.
### Issue: Wrong Commit Count ### Version Handling
**Problem**: Changelog includes commits from other branches - For pre-release versions (e.g., 1.24.0-rc.1), the next stable release should be the same version without the suffix (1.24.0)
**Solution**: Always use `--first-parent` flag with git log - Never skip version numbers - follow semantic versioning strictly
**Update**: Sometimes update-locales doesn't add [skip ci] - always verify! ### Commit History Analysis
- **ALWAYS** use `--first-parent` flag with git log to avoid including commits from merged feature branches
- Verify PR merge targets before including them in changelogs:
```bash
gh pr view ${PR_NUMBER} --json baseRefName
```
### Issue: Missing PRs in Changelog ### Release Workflow Triggers
**Problem**: PR was merged to different branch - The "Release" label on the PR is **CRITICAL** - without it, PyPI/npm publishing won't occur
**Solution**: Verify PR merge target with: - Check for `[skip ci]` in commit messages before merging - this blocks the release workflow
```bash - If you encounter `[skip ci]`, push an empty commit to override it:
gh pr view ${PR_NUMBER} --json baseRefName ```bash
``` git commit --allow-empty -m "Trigger release workflow"
```
### Issue: Incomplete Dependency Changelog ### PR Creation Details
**Problem**: Litegraph or other dependency updates only show version bump, not actual changes - Version bump PRs come from `comfy-pr-bot`, not `github-actions`
**Solution**: The command now automatically: - The workflow typically completes in 20-30 seconds
- Detects litegraph version changes between releases - Always wait for the PR to be created before trying to edit it
- Clones the litegraph repository temporarily
- Extracts and categorizes changes between versions
- Includes detailed litegraph changelog in release notes
- Cleans up temporary files after analysis
### Issue: Release Failed Due to [skip ci] ### Breaking Changes Detection
**Problem**: Release workflow didn't trigger after merge - Analyze changes to public-facing APIs:
**Prevention**: Always avoid this scenario - The `app` object and its methods
- Ensure that `[skip ci]` or similar flags are NOT in the `HEAD` commit message of the PR - The `api` module exports
- Push a new, empty commit to the PR - Extension and workspace manager interfaces
- Always double-check this immediately before merging - Node schema, workflow schema, and other public schemas
- Any modifications to these require marking as breaking changes
**Recovery Strategy**: ### Recovery Procedures
1. Revert version in a new PR (e.g., 1.24.0 → 1.24.0-1) If the release workflow fails to trigger:
2. Merge the revert PR 1. Create a revert PR to restore the previous version
3. Run version bump workflow again 2. Merge the revert
4. This creates a fresh PR without [skip ci] 3. Re-run the version bump workflow
Benefits: Cleaner than creating extra version numbers 4. This approach is cleaner than creating extra version numbers
## Key Learnings & Notes
1. **PR Author**: Version bump PRs are created by `comfy-pr-bot`, not `github-actions`
2. **Workflow Speed**: Version bump workflow typically completes in ~20-30 seconds
3. **Update-locales Behavior**: Inconsistent - sometimes adds [skip ci], sometimes doesn't
4. **Recovery Options**: Reverting version is cleaner than creating extra versions
5. **Dependency Tracking**: Command now automatically includes litegraph and major dependency changes in changelogs
6. **Litegraph Integration**: Temporary cloning of litegraph repo provides detailed change analysis between versions

View File

@@ -138,14 +138,50 @@ For each commit:
```bash ```bash
gh pr create --base core/X.Y --head release/1.23.5 \ gh pr create --base core/X.Y --head release/1.23.5 \
--title "[Release] v1.23.5" \ --title "[Release] v1.23.5" \
--body "..." \ --body "Release notes will be added shortly..." \
--label "Release" --label "Release"
``` ```
3. **CRITICAL**: Verify "Release" label is added 3. **CRITICAL**: Verify "Release" label is added
4. PR description should include: 4. Create standardized release notes:
- Version: `1.23.4` → `1.23.5` ```bash
- Included fixes (link to previous PR) cat > release-notes-${NEW_VERSION}.md << 'EOF'
- Release notes for users ## ⚠️ Breaking Changes
<!-- List breaking changes if any, otherwise remove this entire section -->
- Breaking change description (#PR_NUMBER)
---
## What's Changed
### 🚀 Features
<!-- List features here, one per line with PR reference -->
- Feature description (#PR_NUMBER)
### 🐛 Bug Fixes
<!-- List bug fixes here, one per line with PR reference -->
- Bug fix description (#PR_NUMBER)
### 🔧 Maintenance
<!-- List refactoring, chore, and other maintenance items -->
- Maintenance item description (#PR_NUMBER)
### 📚 Documentation
<!-- List documentation changes if any, remove section if empty -->
- Documentation update description (#PR_NUMBER)
### ⬆️ Dependencies
<!-- List dependency updates -->
- Updated dependency from vX.X.X to vY.Y.Y (#PR_NUMBER)
**Full Changelog**: https://github.com/Comfy-Org/ComfyUI_frontend/compare/v${CURRENT_VERSION}...v${NEW_VERSION}
EOF
```
- For hotfixes, typically only populate the "Bug Fixes" section
- Include links to the cherry-picked PRs/commits
- Update the PR body with the release notes:
```bash
gh pr edit ${PR_NUMBER} --body-file release-notes-${NEW_VERSION}.md
```
5. **CONFIRMATION REQUIRED**: Release PR has "Release" label? 5. **CONFIRMATION REQUIRED**: Release PR has "Release" label?
### Step 11: Monitor Release Process ### Step 11: Monitor Release Process