Files
cluny85 aa948c892d Fix: Restrict publish workflow to repository owner
The publish workflow was previously triggered on any tag push. This commit restricts the workflow to only run when the tag is pushed by the repository owner, preventing unauthorized publishing. It also adds `issues:write` permissions for future use.
2025-06-16 14:28:20 +02:00

53 lines
1.4 KiB
YAML

name: Publish ComfyUI Scripting Tools
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- "pyproject.toml"
tags:
- '*'
pull_request:
branches: [ master ]
permissions:
issues: write
jobs:
build-and-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -r requirements.txt || true
- name: Lint Python files
run: |
pip install flake8
flake8 src --max-line-length=120
- name: Check metadata file
run: |
test -f comfyui_scripting_tools.json
- name: Show publish instructions
run: |
echo "To publish this package, follow the instructions at https://docs.comfy.org/registry/publishing"
publish:
name: "📦 Publish Custom Node to registry"
needs: build-and-check
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'cluny85' && startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Publish to ComfyUI Registry
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}