diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 66481dc..482634b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,9 +31,22 @@ jobs: uses: deargen/workflows/.github/workflows/deploy-mkdocs.yml@master with: requirements-file: deps/lock/x86_64-manylinux_2_28/requirements_docs.txt - gitlab-project: ${{ vars.GITLAB_PROJECT }} - gitlab-branch: master version-tag: ${{ github.event.inputs.version-tag }} deploy-type: tag - secrets: - GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + + publish-to-pypi: + if: ${{ github.event.inputs.dry-run == 'false' }} + needs: commit-changelog-and-release + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.version-tag }} + - uses: deargen/workflows/actions/setup-python-and-uv@master + - name: Build and upload to PyPI + run: | + uv venv + source .venv/bin/activate + uv pip install build twine + python -m build . --sdist + twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --non-interactive