Skip to content

Commit

Permalink
Merge pull request #25 from Promptly-Technologies-LLC/dev
Browse files Browse the repository at this point in the history
Workflow fix
  • Loading branch information
chriscarrollsmith authored Nov 6, 2024
2 parents 233cd0c + 5ac0dd1 commit 913d8e1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
output=$(poetry publish --build -u __token__ -p $PYPI_TOKEN 2>&1)
if [ $? -ne 0 ]; then
echo "::warning::Version has not been incremented. No new version published."
echo "$output"
# Attempt to publish and capture output
if OUTPUT=$(poetry publish --build -u __token__ -p $PYPI_TOKEN 2>&1); then
echo "Package published successfully"
else
echo "::warning::Not published to PyPi. Poetry output: $OUTPUT"
fi
# Ensure step exits successfully
exit 0

0 comments on commit 913d8e1

Please sign in to comment.