From 6f721b0634e1850f60d6bcf12a2858059198f251 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sun, 27 Aug 2023 18:19:33 +0200 Subject: [PATCH] Add manual workflow to publish to TestPyPI --- .github/workflows/test-publish.yaml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test-publish.yaml diff --git a/.github/workflows/test-publish.yaml b/.github/workflows/test-publish.yaml new file mode 100644 index 000000000..b43fa3d51 --- /dev/null +++ b/.github/workflows/test-publish.yaml @@ -0,0 +1,32 @@ +--- +name: Publish test version to TestPyPI + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + environment: testpypi + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '${{ env.DEFAULT_PYTHON }}' + + - name: Build + run: | + # Cheat + sed -i '/\[tool.setuptools_scm\]/ s/$/\nlocal_scheme = "no-local-version"/' pyproject.toml + pip install build + python3 -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/