Fix publish toolkit workflow (#302)
There was a bug where if the poetry publish failed, then the slack message would say that it succeeded. I am setting the notion toolkit version to 0.0.1. This is expected to fail. I'm doing this to ensure the E2E issue is fixed. The grep'd string comes from https://github.com/python-poetry/poetry/blob/main/src/poetry/publishing/uploader.py#L246-L249
This commit is contained in:
parent
cd7eca306a
commit
e048f277fd
2 changed files with 12 additions and 3 deletions
13
.github/workflows/publish-toolkit.yml
vendored
13
.github/workflows/publish-toolkit.yml
vendored
|
|
@ -59,10 +59,19 @@ 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. Skip if the version already exists
|
||||
if poetry publish --skip-existing 2>&1 | grep -q "File exists. Skipping"; then
|
||||
# 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)
|
||||
PUBLISH_STATUS=$?
|
||||
if echo "$PUBLISH_OUTPUT" | grep -q "File exists. Skipping"; then
|
||||
echo "Version already exists on PyPI. Skipping publish."
|
||||
echo "skip_publish=true" >> $GITHUB_OUTPUT
|
||||
elif [ $PUBLISH_STATUS -ne 0 ]; then
|
||||
echo "Failed to publish package:"
|
||||
echo "$PUBLISH_OUTPUT"
|
||||
echo "skip_publish=false" >> $GITHUB_OUTPUT
|
||||
exit $PUBLISH_STATUS
|
||||
else
|
||||
echo "skip_publish=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -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>"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue