More updates to Publish Toolkit Workflow (#305)

This commit is contained in:
Eric Gustin 2025-03-17 15:33:51 -08:00 committed by GitHub
parent 29e895ca44
commit 53a12802f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View file

@ -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

View file

@ -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 <dev@arcade.dev>"]