diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..074b192 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Publish to ComfyUI Registry + +on: + push: + tags: + - 'v*.*.*' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Validate version match + run: | + TAG_VERSION=${GITHUB_REF#refs/tags/v} + TOML_VERSION=$(grep "version" pyproject.toml | head -1 | cut -d'"' -f2) + echo "Tag version: $TAG_VERSION" + echo "pyproject.toml version: $TOML_VERSION" + if [ "$TAG_VERSION" != "$TOML_VERSION" ]; then + echo "❌ Tag v$TAG_VERSION doesn't match pyproject.toml version $TOML_VERSION" + exit 1 + fi + echo "✅ Version validation passed" + + - name: Install comfy-cli + run: | + pip install comfy-cli + + - name: Validate node metadata + run: | + comfy node validate + + - name: Publish to Registry + env: + REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }} + run: | + comfy node publish --confirm diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6e86836 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,49 @@ +name: Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + pip install ruff + + - name: Lint with ruff + run: | + ruff check . + ruff format --check . + + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install comfy-cli + run: | + pip install comfy-cli + + - name: Validate node metadata + run: | + comfy node validate diff --git a/README.md b/README.md index aefaa88..5273a0b 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ pip install -r requirements.txt Search for "Prompt Generator" in the ComfyUI Manager and install. +**Note**: If you see "With the current security level configuration, only custom nodes from the 'default channel' can be installed", temporarily set `security_level = weak` in your ComfyUI Manager's `config.ini` file, then restore it to `normal` after installation. See [PUBLISHING.md](PUBLISHING.md) for details. + ## Usage 1. Restart ComfyUI after installation diff --git a/prompt-gen-icon.png b/prompt-gen-icon.png deleted file mode 100644 index 97c7fef..0000000 Binary files a/prompt-gen-icon.png and /dev/null differ diff --git a/pyproject.toml b/pyproject.toml index 1329daf..89ccf00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-prompt-generator" description = "Generate Stable Diffusion prompts using Qwen3-8B via Ollama with 7 style presets" -version = "1.0.3" +version = "1.0.4" license = {file = "LICENSE"} readme = "README.md" requires-python = ">=3.10"