-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from gro-intelligence/jli-poetry-shippable
enable poetry publishing from shippable
- Loading branch information
Showing
1 changed file
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |