From 842f640842e4454741e579a633ffcf1243954671 Mon Sep 17 00:00:00 2001 From: Eric Rollei <97568200+EricRollei@users.noreply.github.com> Date: Fri, 19 Dec 2025 16:53:04 -0800 Subject: [PATCH] Add notifications to publish workflow - Extract version from pyproject.toml for logging - Log success message with version number - Create GitHub issue on failure with details and link to workflow run --- .github/workflows/publish.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e6f0f7c..cc8ab37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,8 +21,37 @@ jobs: uses: actions/checkout@v4 with: submodules: true + + - name: Extract version from pyproject.toml + id: version + run: | + VERSION=$(grep -m1 'version = ' pyproject.toml | cut -d'"' -f2) + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Publish Custom Node + id: publish 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 }} + + - name: Create success issue comment + if: success() + uses: actions/github-script@v7 + with: + script: | + const version = '${{ steps.version.outputs.version }}'; + console.log(`✅ Successfully published version ${version} to ComfyUI Registry`); + + - name: Notify on failure + if: failure() + uses: actions/github-script@v7 + with: + script: | + const version = '${{ steps.version.outputs.version }}'; + github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `🚨 Registry publish failed for v${version}`, + body: `The automated publish to ComfyUI Registry failed.\n\n**Version:** ${version}\n**Workflow run:** ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}\n\nPlease check the workflow logs for details.`, + labels: ['bug', 'automation'] + });