From 53a12802f6510150492fd5cf7bddc9c06b09db6a Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Mon, 17 Mar 2025 15:33:51 -0800 Subject: [PATCH] More updates to Publish Toolkit Workflow (#305) --- .github/workflows/publish-toolkit.yml | 14 +++++++++----- toolkits/notion/pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-toolkit.yml b/.github/workflows/publish-toolkit.yml index cceb67bb..36d2c085 100644 --- a/.github/workflows/publish-toolkit.yml +++ b/.github/workflows/publish-toolkit.yml @@ -59,11 +59,15 @@ jobs: VERSION=$(poetry version -s) echo "version=$VERSION" >> $GITHUB_OUTPUT poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} - # Attempt to publish the toolkit to PyPI. - # If the toolkit version already exists, skip publishing. - # If another error occurs, exit with the error code so that the step fails. - PUBLISH_OUTPUT=$(poetry publish --skip-existing 2>&1 || true) - PUBLISH_STATUS=$? + + # Run the publish command in an if-statement to capture output and status. + if PUBLISH_OUTPUT=$(poetry publish --skip-existing 2>&1); then + PUBLISH_STATUS=0 + else + PUBLISH_STATUS=$? + fi + + # If the output indicates that the version already exists, mark it as a skip. if echo "$PUBLISH_OUTPUT" | grep -q "File exists. Skipping"; then echo "Version already exists on PyPI. Skipping publish." echo "skip_publish=true" >> $GITHUB_OUTPUT diff --git a/toolkits/notion/pyproject.toml b/toolkits/notion/pyproject.toml index c4e944b8..861e5493 100644 --- a/toolkits/notion/pyproject.toml +++ b/toolkits/notion/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "arcade_notion" -version = "0.1.0" +version = "0.0.1" description = "LLM tools for essential Notion interactions such as creating, updating, retrieving, and searching pages." authors = ["ArcadeAI "]