自动推送测试
This commit is contained in:
@@ -1,42 +1,34 @@
|
||||
name: comfyui_sunxAI_facetools CI build
|
||||
# GitHub CI build pipeline
|
||||
name: {{ cookiecutter.project_slug }} CI build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ main ] # 可选:推送 main 时也跑一遍
|
||||
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ "3.10", "3.12" ]
|
||||
|
||||
runs-on: {% raw %} ${{ matrix.os }} {% endraw %}
|
||||
env:
|
||||
PYTHONIOENCODING: "utf8"
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.12"]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
python-version: {% raw %} ${{ matrix.python-version }} {% endraw %}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# 安装项目 + 开发依赖(依赖你的 pyproject 中的 optional-dependencies.dev)
|
||||
pip install ".[dev]"
|
||||
|
||||
pip install .[dev]
|
||||
- name: Run Linting
|
||||
run: |
|
||||
ruff version
|
||||
ruff check .
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
pytest -q
|
||||
pytest tests/
|
||||
|
||||
@@ -1,48 +1,39 @@
|
||||
name: Publish Comfy Node
|
||||
name: 📦 Auto Tag + Publish to Comfy registry
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
- "nodes.py"
|
||||
- "**/*.py"
|
||||
- ".github/workflows/publish_node.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write # 需要打 tag 权限
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: ♻️ Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- name: 🧪 Extract version from pyproject.toml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(grep '^version' pyproject.toml | head -n 1 | cut -d '"' -f2)
|
||||
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
echo "::set-output name=version::$VERSION"
|
||||
|
||||
- name: 🏷️ Create Git Tag
|
||||
run: |
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
git tag v${{ steps.get_version.outputs.version }}
|
||||
git push origin v${{ steps.get_version.outputs.version }}
|
||||
|
||||
- name: 📦 Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@main
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install comfy-cli
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install "comfy-cli>=0.9.0"
|
||||
|
||||
- name: Validate node
|
||||
run: |
|
||||
comfy node validate
|
||||
|
||||
- name: Publish node
|
||||
env:
|
||||
COMFY_REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
run: |
|
||||
if [ -z "${COMFY_REGISTRY_ACCESS_TOKEN}" ]; then
|
||||
echo "Missing secret: REGISTRY_ACCESS_TOKEN"; exit 1;
|
||||
fi
|
||||
# 大多数版本的 comfy-cli 会从 COMFY_REGISTRY_ACCESS_TOKEN 读取 Token
|
||||
# 如果你的版本需要从标准输入读取,可以改为:
|
||||
# echo "${COMFY_REGISTRY_ACCESS_TOKEN}" | comfy node publish
|
||||
comfy node publish
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
name: Validate backwards compatibility
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: comfy-org/node-diff@main
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "comfyui_sunxAI_facetools"
|
||||
version = "0.0.5" # 每次发布务必递增
|
||||
version = "0.0.6" # 每次发布务必递增
|
||||
description = "Face detection & restoration tools for ComfyUI by Sunx.ai"
|
||||
authors = [
|
||||
{ name = "Sunx.ai", email = "sunx.ai@hotmail.com" }
|
||||
|
||||
Reference in New Issue
Block a user