Skip to content

Fix Comfy Registry publish failure: bump version, restore version gua… #13

Fix Comfy Registry publish failure: bump version, restore version gua…

Fix Comfy Registry publish failure: bump version, restore version gua… #13

Workflow file for this run

name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- "pyproject.toml"
permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'EnragedAntelope' }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 2
- name: Detect version change
id: version_check
run: |
set -e
OLD_VERSION=$(git show HEAD^:pyproject.toml 2>/dev/null | grep '^version' | sed 's/.*"//' | sed 's/".*//')
NEW_VERSION=$(grep '^version' pyproject.toml | sed 's/.*"//' | sed 's/".*//')
echo "old=${OLD_VERSION}"
echo "new=${NEW_VERSION}"
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Publish Custom Node
if: steps.version_check.outputs.changed == 'true'
uses: Comfy-Org/publish-node-action@v1
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}