diff --git a/.github/workflows/test.yml b/.github/workflows/build.yml similarity index 70% rename from .github/workflows/test.yml rename to .github/workflows/build.yml index a26d1237..d51a3380 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Unit tests +name: Build on: [push] @@ -26,3 +26,10 @@ jobs: run: | pipenv run pytest --cov=fastapi_users/ pipenv run codecov + - name: Release on PyPI + if: startsWith(github.ref, 'refs/tags/') + env: + FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }} + FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }} + run: | + pipenv run flit publish