36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
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"
|