Skip to content

Commit

Permalink
chore: auto release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Nov 8, 2024
1 parent 1fee0c2 commit b5a9a83
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- "*"

jobs:
build-package:
name: Build & inspect our package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

release-pypi:
name: Publish released package to pypi.org
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/project/comfyui-idl/${{ github.ref_name }}
runs-on: ubuntu-latest
needs: build-package

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions src/comfyui_idl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _get_node_identifier(node, dep_map=None) -> str:
return _normalize_to_identifier(title)


def _parse_workflow(workflow: dict) -> tuple[dict, dict]:
def _parse_workflow(workflow: dict) -> tuple[dict[str, Any], dict[str, Any]]:
"""
Parse the workflow template and return the input and output definition
"""
Expand Down Expand Up @@ -194,9 +194,9 @@ def retrieve_workflow_outputs(
value_map[k] = path_strs
return value_map

node = list(outputs.values())[0]
name, node = next(iter(outputs.items()))
if node["class_type"] not in BENTO_OUTPUT_NODES:
raise ValueError(f"Output node is not of type {BENTO_OUTPUT_NODES}")
raise ValueError(f"Output node {name} is not of type {BENTO_OUTPUT_NODES}")
node_id = node["id"]

outs = list(output_path.glob(f"{node_id}_*"))
Expand Down

0 comments on commit b5a9a83

Please sign in to comment.