Skip to content

Commit

Permalink
Merge pull request #281 from gro-intelligence/jli-poetry-shippable
Browse files Browse the repository at this point in the history
enable poetry publishing from shippable
  • Loading branch information
muzigao authored Nov 17, 2020
2 parents 6424069 + fa1e005 commit e90735f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,23 @@ build:
git config --global user.name "Gro Intelligence" &&
git remote set-url origin [email protected]:$REPO_FULL_NAME.git &&
ssh-agent bash -c 'ssh-add /tmp/ssh/00_sub; poetry run sphinx-versioning push -r development docs gh-pages .'
# Publish new development updates to TestPyPI.
# TODO(jli): for some reason, shippable builds are failing due to the PyPI
# tokens being undefined. commenting this for now, will attempt to add it
# back later.
# Publish new development updates to TestPyPI whenever changes are merged
# to development.
#
# Note: for all changes to an in-progress PR, Shippable launches 2 jobs:
# one for the PR branch, and another for the PR branch merged into
# development branch. See: https://github.com/Shippable/support/issues/3938#issuecomment-342244497
# We only want to publish a new package when PRs are actually accepted and
# merged, which is why we check $IS_PULL_REQUEST.
- >
if [ "$BRANCH" == "development" ]; then
if [ "$BRANCH" == "development" && "$IS_PULL_REQUEST" == "false" ]; then
poetry config repositories.testpypi https://test.pypi.org/legacy/ &&
echo "TODO: publish to TestPyPI"
# poetry publish -u __token__ -p $TESTPYPI_TOKEN -r testpypi
poetry publish -u __token__ -p $TESTPYPI_TOKEN -r testpypi
fi
# Publish new releases to PyPI.
# Note: requires configuring Shippable for release webhooks:
# http://docs.shippable.com/ci/trigger-job/#configuring-build-triggers
- >
if [ $IS_RELEASE == "true" ]; then
echo "TODO: publish to PyPI"
# poetry publish -u __token__ -p $PYPI_TOKEN
if [ "$IS_RELEASE" == "true" ]; then
poetry publish -u __token__ -p $PYPI_TOKEN
fi

0 comments on commit e90735f

Please sign in to comment.