Files
StarAsh042 99b4cb2cbd build: 添加 Comfy Registry 发布工作流
pyproject 变更推送到 main 时触发发布;手动触发保留给回滚补发。
2026-10-15 09:12:00 +08:00

36 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Publish to Comfy registry
# 触发条件:
# 1) 手动触发(Actions 页面 Run workflow)
# 2) 推送到 main/master 且 pyproject.toml 有变更(通常是递增 version)
on:
workflow_dispatch:
push:
branches:
- main
- master
paths:
- "pyproject.toml"
# 最小权限:checkout 与发布只需要读取仓库内容
permissions:
contents: read
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'StarAsh042' }}
steps:
- name: Check out code
# @v7 使用 Node 24 运行时(@v4 仍为 Node 20,已被 GitHub 弃用)
uses: actions/checkout@v7
- name: Publish Custom Node
# 官方文档推荐 @main(该 action 的 tag 只有 1.0.0/1.0.1,已落后于 main)
uses: Comfy-Org/publish-node-action@main
with:
## 在仓库 Settings -> Secrets and variables -> Actions 中配置该 Secret
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
## 上一步已完成 checkout,跳过该 action 内部重复的 actions/checkout@v4(Node 20)
skip_checkout: "true"