Files

39 lines
1.3 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), as plain text: the registry shows one paragraph.
run: |
version=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml | head -n1)
notes=$(python3 .github/scripts/registry_changelog.py "$version")
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"
echo "$notes"
echo "$delimiter"
} >> "$GITHUB_ENV"
echo "Changelog for $version: $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"