-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker | ||
# Following generated with | ||
# travis encrypt -r python-pillow/pillow-wheels WHEELHOUSE_UPLOADER_SECRET=<the api key> | ||
- secure: "ky76goiK6n4k8V9/uG340GSFVwmjE7G76l9xbhhGZkcph4eTwN5VRM/tqyJvlNs/HZOhKSILfyGBeaG8qf7gHmwr0touPT+EjWn4TNV8iyVj75ZshgRE9DuaIAfdH89gW2m+BmvBDyzi0JE3KVCu55NcGm8h7Ecl6nmQ/c2iROY=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, no longer using wheelhouse_uploader.
@@ -110,17 +106,20 @@ jobs: | |||
os: osx | |||
osx_image: xcode9.3 | |||
language: generic | |||
if: tag IS blank |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent the latest jobs building for tag builds.
.travis.yml
Outdated
@@ -219,16 +229,20 @@ install: | |||
- if [[ -n "$LATEST" ]]; then BUILD_COMMIT=master; fi | |||
- clean_code $REPO_DIR $BUILD_COMMIT | |||
- build_wheel $REPO_DIR $PLAT | |||
- ls -l "${TRAVIS_BUILD_DIR}/wheelhouse/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For info to confirm a wheel was built.
deploy: | ||
provider: releases | ||
api_key: | ||
secure: PTgVG7DrYa2FTSQOq0eDaHDZb1vy0vf6MulyuoXMg8rssPQgJ/mYxRpNDK4V0EKolpN7f8s/OGg+fpNNtp5pOCJGsx0Okcf+YB2ac+Xl7DQPBucbDKFXs1ndf/ny6umk0TXX8JTrDp/mJDJf401yx1+qsZ6X/PFvchXvXVrQ+SQ= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an encrypted OAuth token created using travis setup releases
on my account when inside a local checkout of the https://github.com/python-pillow/pillow-wheels/ repo (ie. not my fork).
https://docs.travis-ci.com/user/deployment/releases/#authenticating-with-an-oauth-token
provider: releases | ||
api_key: | ||
secure: PTgVG7DrYa2FTSQOq0eDaHDZb1vy0vf6MulyuoXMg8rssPQgJ/mYxRpNDK4V0EKolpN7f8s/OGg+fpNNtp5pOCJGsx0Okcf+YB2ac+Xl7DQPBucbDKFXs1ndf/ny6umk0TXX8JTrDp/mJDJf401yx1+qsZ6X/PFvchXvXVrQ+SQ= | ||
file_glob: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can use *.whl
in the next line.
file_glob: true | ||
file: "${TRAVIS_BUILD_DIR}/${WHEEL_SDIR}/*.whl" | ||
on: | ||
condition: -z "$LATEST" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant with if: tag IS blank
, but a useful extra guard to make sure we don't build wheels for latest.
file: "${TRAVIS_BUILD_DIR}/${WHEEL_SDIR}/*.whl" | ||
on: | ||
condition: -z "$LATEST" | ||
repo: python-pillow/pillow-wheels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sure the deploy is only run from this repo.
on: | ||
condition: -z "$LATEST" | ||
repo: python-pillow/pillow-wheels | ||
tags: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And only for tags.
condition: -z "$LATEST" | ||
repo: python-pillow/pillow-wheels | ||
tags: true | ||
skip_cleanup: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, tell Travis not to delete all the files, including wheels, before deploy.
https://docs.travis-ci.com/user/deployment#uploading-files-and-skip_cleanup
And here's a test build on my fork (ignore the release is 7.2.1 and the files are 7.2.0, was just for test): |
Co-authored-by: Andrew Murray <[email protected]>
Fixes #146, using one of @mattip's suggestions.
Based on Cython's config:
Travis CI docs:
The wheels are only built for tags, and the workflow will change a bit so we'll need to update:
RELEASING.md
checklist,README.md
update-pillow-tag.sh
.When releasing, we add and push a tag. It builds as normal (and also skips the "latest" jobs, we don't need to build/deploy them). The wheels are uploaded to a matching tag release here in this repo.
We can then download the wheels from the release, and can
twine upload
with the separately-built Windows wheels, and source (this looks handy for downloading).(We could delete the release/files from here if we wanted to ensure PyPI is the place to go, not sure if that's necessary.)
Here's an example:
Note we'd still need a normal
git push
(without--tags
), but that will do a normal build of latest and non-latest (and no wheels), so that could come in the post-release thing, to avoid eating up CI time.I'll annotate some lines too with some extra info.