The publish workflow passes the version's CHANGELOG.md section to comfy-cli (COMFY_NODE_CHANGELOG), icon.png is re-rendered from icon.svg at 512x512 with all four corners rounded, and the description covers the features.
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: Publish to Comfy registry
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "pyproject.toml"
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
- name: Changelog for this version
|
|
# comfy-cli sends COMFY_NODE_CHANGELOG as the version's changelog
|
|
# (the registry's Updates section): the matching CHANGELOG.md section.
|
|
run: |
|
|
version=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml | head -n1)
|
|
notes=$(awk -v v="$version" '
|
|
$0 ~ "^## " v "( |$)" { on = 1; next }
|
|
on && /^## / { exit }
|
|
on { print }
|
|
' CHANGELOG.md | sed -e '/./,$!d')
|
|
if [ -z "$notes" ]; then
|
|
echo "::warning::No CHANGELOG.md section for $version"
|
|
exit 0
|
|
fi
|
|
delimiter="EOF_$(date +%s%N)"
|
|
{
|
|
echo "COMFY_NODE_CHANGELOG<<$delimiter"
|
|
printf '%s\n' "$notes"
|
|
echo "$delimiter"
|
|
} >> "$GITHUB_ENV"
|
|
echo "Changelog for $version:"
|
|
printf '%s\n' "$notes"
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@main
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} ## Add your own personal access token to your Github Repository secrets and reference it here.
|
|
skip_checkout: "true"
|