summaryrefslogtreecommitdiffstats
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d58e3e41..d36e25f1 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -83,3 +83,36 @@ jobs:
platforms: ${{env.DOCKER_PLATFORMS}}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
+
+ pypi:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Install pypa/build
+ run: >-
+ python -m
+ pip install
+ build
+ --user
+
+ - name: Build a binary wheel and a source tarball
+ run: >-
+ python -m
+ build
+ --sdist
+ --wheel
+ --outdir dist/
+
+ - name: Publish distribution package to Test PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: ${{ secrets.PYPI_USERNAME }}
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
+ repository_url: https://test.pypi.org/legacy/
+
+ - name: Publish distribution package to PyPI
+ if: startsWith(github.ref, 'refs/tags')
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: ${{ secrets.PYPI_USERNAME }}
+ password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file