43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Publish to Comfy registry
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
paths:
|
|
- "pyproject.toml"
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Extract version from tag
|
|
id: get_version
|
|
run: |
|
|
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
|
|
|
- name: Update pyproject.toml version (not committed)
|
|
run: |
|
|
echo "Current pyproject.toml content:"
|
|
cat pyproject.toml
|
|
echo "TAG_VERSION: ${TAG_VERSION}"
|
|
|
|
# 更可靠的 sed 命令
|
|
sed -i "s/version = \"[^\"]*\"/version = \"${TAG_VERSION}\"/" pyproject.toml
|
|
|
|
echo "Updated pyproject.toml content:"
|
|
cat pyproject.toml
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@v1
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|