diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..6439225 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,25 @@ +name: Publish Python package + +on: + push: + branches: [ master ] + release: + types: [created] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install Poetry + run: pip install poetry + - name: Build and publish to PyPI + env: + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + poetry build + poetry publish --username __token__ --password $PYPI_API_TOKEN