summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-03-03 07:47:53 -0600
committerJordan Cook <jordan.cook@pioneer.com>2021-03-03 07:52:32 -0600
commite830db17976899f4a5a70edbdb9efe85c4909af6 (patch)
treecdbe8b62371bde526e6ed2d38bfc90911760f162 /.github
parent7c1067ce483f31d2727d2c04f4acd811a3fef2ff (diff)
downloadrequests-cache-e830db17976899f4a5a70edbdb9efe85c4909af6.tar.gz
Add automated pypi deployments, and deploy a pre-release build (only installable with pip install --pre
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 338c112..dfa9f22 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -78,3 +78,24 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
+
+ # Deploy stable builds on tags only
+ release:
+ needs: [test, analyze]
+ if: startsWith(github.ref, 'refs/tags/v')
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: '3.8'
+
+ - name: Install dependencies
+ run: pip install -U ".[build]"
+ - name: Build wheel
+ run: python setup.py sdist bdist_wheel
+ - name: Deploy to pypi
+ env:
+ TWINE_USERNAME: __token__
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+ run: twine upload dist/*