name: Publish django-guid to PyPI 📦

on:
  release:
    types: [ published ]

jobs:
  build-and-publish:
    name: Build and publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - run: python -m pip install --upgrade pip poetry
      - name: Build and publish
        run: |
          poetry config pypi-token.pypi ${{ secrets.pypi_password }}
          poetry publish --build --no-interaction
