40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: 📦 Auto Tag + Publish to Comfy registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "pyproject.toml"
|
|
|
|
permissions:
|
|
contents: write # 需要打 tag 权限
|
|
issues: write
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: ♻️ Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- 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:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|