Files

39 lines
1.3 KiB
YAML

name: Publish to Comfy registry
on:
workflow_dispatch:
permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'huchukato' }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Extract changelog
run: |
VERSION=$(sed -n 's/^version = "\([^"]*\)"/\1/p' pyproject.toml | head -1)
ESCAPED=$(printf '%s' "$VERSION" | sed 's/\./\\./g')
for f in update.md UPDATE.md CHANGELOG.md; do
[ -f "$f" ] || continue
awk -v ver="$ESCAPED" '
/^## / {
if (found) exit
if ($0 ~ ("(^|[^0-9.])" ver "([^0-9.]|$)")) { found = 1 }
next
}
found { print }
' "$f" > changelog.txt
[ -s changelog.txt ] && break
done
[ -s changelog.txt ] || git log -1 --pretty=%B > changelog.txt
head -c 4000 changelog.txt > changelog.tmp && mv changelog.tmp changelog.txt
- name: Publish Custom Node
run: |
pip install comfy-cli
comfy --skip-prompt --no-enable-telemetry env
comfy node publish --token "${{ secrets.REGISTRY_ACCESS_TOKEN }}" --changelog-file changelog.txt