From 433315f4a11d3f6b0054c3cb30bed8844fd715ea Mon Sep 17 00:00:00 2001 From: GACLove Date: Wed, 16 Jul 2025 19:01:39 +0800 Subject: [PATCH] fix: update workflow --- .github/workflows/publish.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eca52b2..fc9d91c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,9 +2,8 @@ name: Publish to Comfy registry on: workflow_dispatch: push: - branches: - - main - - master + tags: + - "v*" paths: - "pyproject.toml" @@ -15,14 +14,22 @@ jobs: publish-node: name: Publish Custom Node to registry runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'GACLove' }} 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: | + sed -i "s/^version = \".*\"/version = \"${TAG_VERSION}\"/" pyproject.toml + - name: Publish Custom Node uses: Comfy-Org/publish-node-action@v1 with: - ## Add your own personal access token to your Github Repository secrets and reference it here. personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}