Skip to content

Commit

Permalink
Add Github Action job for creating PyPI releases
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Jan 22, 2021
1 parent 3fdf293 commit 3aec8cc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,28 @@ jobs:
file: ./Dockerfile
push: false
tags: locustio/locust:latest

release:
name: Release to PyPI
needs: verify_docker_build
if: startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI (Test)

uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 3aec8cc

Please sign in to comment.