Update publish workflow #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to Comfy registry | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
branches: | |
- main | |
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: Get version from pyproject.toml | |
id: get_version | |
run: | | |
VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2) | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Check version matches tag | |
if: | | |
github.repository_owner == 'Kidev' && | |
github.ref_type == 'tag' && | |
github.ref_name == format('v{0}', steps.get_version.outputs.version) | |
run: echo "Version matches tag, proceeding with publish" | |
- name: Publish Custom Node | |
if: success() | |
uses: Comfy-Org/publish-node-action@v1 | |
with: | |
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} |