42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Publish to Comfy registry & GitHub Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "pyproject.toml"
|
|
|
|
jobs:
|
|
publish-node:
|
|
name: Publish Custom Node to registry
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # Gives GitHub permission to create tags & releases
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Publish Custom Node
|
|
uses: Comfy-Org/publish-node-action@main
|
|
with:
|
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
|
|
|
# 1. Read version string from pyproject.toml
|
|
- name: Extract Version
|
|
id: get_version
|
|
run: |
|
|
VERSION=$(grep -m 1 'version' pyproject.toml | cut -d '"' -f 2)
|
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
|
|
# 2. Automatically create Git Tag & GitHub Release
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: v${{ env.VERSION }}
|
|
name: v${{ env.VERSION }}
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |