diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a9822f1..2c9bf79 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,16 +11,35 @@ on: jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] steps: - uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} + - name: Setup Python 3.12 uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: "3.12" - name: Install Dependencies run: pip install ".[dev]" - - name: Build on Python ${{ matrix.python-version }} + - name: Build on Python 3.12 run: hatch build + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + publish-to-pypi: + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/html_to_django + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1