You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: zh-CN/registry/publishing.mdx
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,24 +119,37 @@ See it here: https://registry.comfy.org/publisherId/your-node
119
119
```bash
120
120
name: Publish to Comfy registry
121
121
on:
122
-
workflow_dispatch:
123
122
push:
124
-
branches:
125
-
- main
123
+
branches: [main]
126
124
paths:
127
125
- "pyproject.toml"
126
+
workflow_dispatch:
128
127
129
128
jobs:
130
129
publish-node:
131
-
name: Publish Custom Node to registry
132
130
runs-on: ubuntu-latest
133
131
steps:
134
-
- name: Check out code
135
-
uses: actions/checkout@v4
132
+
- uses: actions/checkout@v4
133
+
134
+
- name: Detect version change
135
+
id: version_check
136
+
run: |
137
+
set -e
138
+
OLD_VERSION=$(git show HEAD^:pyproject.toml 2>/dev/null | grep '^version'| sed 's/.*"//'| sed 's/".*//')
139
+
NEW_VERSION=$(grep '^version' pyproject.toml | sed 's/.*"//'| sed 's/".*//')
140
+
echo"old=${OLD_VERSION}"
141
+
echo"new=${NEW_VERSION}"
142
+
if [ "$OLD_VERSION"!="$NEW_VERSION" ];then
143
+
echo"changed=true">>$GITHUB_OUTPUT
144
+
else
145
+
echo"changed=false">>$GITHUB_OUTPUT
146
+
fi
147
+
136
148
- name: Publish Custom Node
149
+
if: steps.version_check.outputs.changed == 'true'
137
150
uses: Comfy-Org/publish-node-action@main
138
151
with:
139
-
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}## Add your own personal access token to your Github Repository secrets and reference it here.
0 commit comments