48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Publish to Comfy Registry
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "pyproject.toml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: comfy-registry-publish-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.repository == 'Azornes/Comfyui-Model-Resolver' }}
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Check registry token
|
|
env:
|
|
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
run: |
|
|
if [ -z "$REGISTRY_ACCESS_TOKEN" ]; then
|
|
echo "::error title=Missing REGISTRY_ACCESS_TOKEN::Create a Comfy Registry publishing API key and add it as a repository secret named REGISTRY_ACCESS_TOKEN."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Install comfy-cli
|
|
run: python -m pip install --upgrade comfy-cli
|
|
|
|
- name: Publish Custom Node
|
|
env:
|
|
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
run: comfy --skip-prompt --no-enable-telemetry env comfy node publish --token "$REGISTRY_ACCESS_TOKEN"
|