ci: send each version's changelog to the comfy registry

The registry's Updates section was empty for every version because the
publish workflow never passed a changelog. comfy-cli reads
COMFY_NODE_CHANGELOG, so the workflow now builds it from the version's
CHANGELOG.md section. The registry shows it as one plain paragraph (no
Markdown), so the script keeps the first column of each table row.

Releases also date that CHANGELOG section and get an annotated vX.Y.Z
tag; CLAUDE.md and /version-bump describe the steps.
This commit is contained in:
Çağan Kiraz
2026-10-02 00:53:27 +03:00
parent 3b3c8f31bb
commit 56481721a7
4 changed files with 73 additions and 8 deletions
+10 -7
View File
@@ -1,12 +1,12 @@
---
description: Bump the package version in pyproject.toml (patch | minor | major) and suggest the matching Conventional Commits release commit message.
description: Bump the package version in pyproject.toml (patch | minor | major), date its CHANGELOG section, and suggest the release commit message and tag.
allowed-tools: Read, Edit, Bash(git diff:*)
argument-hint: patch | minor | major
---
# `/version-bump` — bump pyproject.toml version
Edits a single field — `[project] version` in `pyproject.toml` — using semver.
Edits `[project] version` in `pyproject.toml` using semver, and dates the matching `CHANGELOG.md` section (the publish workflow sends that section to the registry as the version's changelog).
## Workflow
@@ -18,18 +18,21 @@ Edits a single field — `[project] version` in `pyproject.toml` — using semve
- If missing or invalid: ask once.
3. Edit `pyproject.toml`:
- `version = "<old>"` → `version = "<new>"`.
4. `git diff pyproject.toml` — confirm exactly one line changed.
5. Propose a commit message (do not run `git commit`):
4. Edit `CHANGELOG.md`:
- `## [Unreleased]` → `## [<new>] — <today, YYYY-MM-DD>`.
- If there is no `## [Unreleased]` section, warn the user: the registry will show no changelog for `<new>`.
5. `git diff pyproject.toml CHANGELOG.md` — confirm exactly one line changed in each.
6. Propose the commit message and the tag (do not run `git commit` or `git tag`):
```
chore(release): bump version to <new>
```
Suggest the user run `/commit` (or `git commit -m '...' pyproject.toml`) when they're ready.
Suggest the user run `/commit` (or `git commit -m '...' pyproject.toml CHANGELOG.md`), then tag that commit with `git tag -a v<new> -m "v<new>"` and push both with `git push --follow-tags`.
## Safety rails
- **Only** modify the `version` field. No description / license / dependency changes.
- Do not touch any other file (no CHANGELOG, no git tag, no push).
- **Only** modify the `version` field and the CHANGELOG heading. No description / license / dependency changes.
- Do not touch any other file (no git tag, no push).
- Do not commit.
- If `version` is missing or unparseable, stop and ask the user.
+54
View File
@@ -0,0 +1,54 @@
"""Print a version's CHANGELOG.md entry as plain text for the Comfy Registry.
The registry's "Updates" section shows the changelog as one plain-text
paragraph (no Markdown, newlines collapse), so each table is reduced to its
first column: "Added: A; B. Fixed: C. Full changelog: <url>".
Usage: registry_changelog.py [version] (defaults to pyproject.toml's version)
"""
import re
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def plain(cell):
cell = re.sub(r"\[([^\]]*)\]\([^)]*\)", r"\1", cell) # [text](url) -> text
return cell.replace("\\|", "|").replace("`", "").replace("**", "").strip()
def main():
pyproject = (ROOT / "pyproject.toml").read_text(encoding="utf-8")
version = sys.argv[1] if len(sys.argv) > 1 else re.search(r'^version\s*=\s*"([^"]+)"', pyproject, re.M).group(1)
changelog = (ROOT / "CHANGELOG.md").read_text(encoding="utf-8")
section = re.search(rf"^## \[{re.escape(version)}\][^\n]*\n(.*?)(?=^## \[|\Z)", changelog, re.M | re.S)
if not section:
print(
f"::warning::CHANGELOG.md has no '## [{version}]' section; publishing without a changelog", file=sys.stderr
)
return
groups, in_table = [], False # [(heading, [first-column cells])]
for line in section.group(1).splitlines():
if line.startswith("### "):
groups.append((line[4:].strip(), []))
in_table = False
elif line.startswith("|"):
if not in_table:
in_table = True # the first row of every table is its header
elif groups and not re.match(r"^\|[\s:|-]+$", line): # skip the |---| separator
groups[-1][1].append(plain(re.split(r"(?<!\\)\|", line)[1]))
else:
in_table = False
parts = [f"{heading}: {'; '.join(items)}." for heading, items in groups if items]
repo = re.search(r'^Repository\s*=\s*"([^"]+)"', pyproject, re.M)
if repo:
parts.append(f"Full changelog: {repo.group(1)}/blob/master/CHANGELOG.md")
print(" ".join(parts))
if __name__ == "__main__":
main()
+8
View File
@@ -19,6 +19,14 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
# comfy-cli sends $COMFY_NODE_CHANGELOG as the version's changelog (the registry's "Updates" section)
- name: Build registry changelog from CHANGELOG.md
run: |
{
echo "COMFY_NODE_CHANGELOG<<CHANGELOG_EOF"
python3 .github/scripts/registry_changelog.py
echo "CHANGELOG_EOF"
} >> "$GITHUB_ENV"
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@v1
with:
+1 -1
View File
@@ -92,7 +92,7 @@ This is a **ComfyUI custom-nodes package** that wraps the **Black Forest Labs (B
- **Polling**: 5-second interval, max 40 attempts (~200 s ceiling). Already implemented in `BaseFlux.get_result` — do not write a second polling loop in a subclass.
- **Config resolution**: every generation node accepts an optional `config` input of type `BFL_CONFIG` (the output of `FluxConfig_BFL`). Pass it through to `super().generate_image(url_path, arguments, config)`; the base class hands it to `get_config_loader(config)` from `nodes/config_node.py:57-67`, which decides whether to use the `config.ini`-backed default loader or build one from the override. **Both paths must work** — `config=None` (use file) and `config=<dict>` (override).
- **Conventional Commits 1.0.0**: `<type>[scope][!]: <description>`. Types: `feat`, `fix`, `refactor`, `chore`, `docs`, `style`, `perf`, `test`, `build`, `ci`. Scopes: `api`, `finetune`, `config`, `utils`, `web`, `docs`, `release`, `tooling`. Description: lowercase, imperative ("add", not "added"/"adds"), no trailing period, ≤ 72 chars. Body explains *why*, wrapped at 72. Use `!` after type/scope for breaking changes. No Jira prefix. **No `Co-Authored-By: Claude` / "Generated with…" footer.** Do NOT inspect `git log` to derive style — historical commits used `update:` and similar non-standard types; the new standard starts now.
- **Version bumps**: edit `pyproject.toml` `version` field only. Commit message: `chore(release): bump version to X.Y.Z`.
- **Version bumps**: edit `pyproject.toml` `version` field and rename `CHANGELOG.md`'s `## [Unreleased]` heading to `## [X.Y.Z] — YYYY-MM-DD` — the publish workflow turns that section into the registry's changelog (`.github/scripts/registry_changelog.py` keeps the first column of each table row, so keep those entries short and plain). Commit message: `chore(release): bump version to X.Y.Z`. Then tag that commit `git tag -a vX.Y.Z -m "vX.Y.Z"` and push both with `git push --follow-tags`.
### Never do