diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5bbb84c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + name: Build and Release + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + + - name: Build package + run: | + poetry build + + - name: Publish to PyPI + run: | + poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}