diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1a1262c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release to PyPi + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + + - name: Configure Poetry + run: | + poetry config virtualenvs.create false + poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} + + - name: Build and publish + run: | + poetry build + poetry publish