diff --git a/.github/workflows/testpypi.yml b/.github/workflows/testpypi.yml new file mode 100644 index 0000000..767afff --- /dev/null +++ b/.github/workflows/testpypi.yml @@ -0,0 +1,31 @@ +name: Publish to TestPyPI + +# Configure a TestPyPI Trusted Publisher for hsluv/hsluv-python, testpypi.yml, +# environment testpypi. Run from main with a version not already on TestPyPI. +on: + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + publish: + if: github.repository == 'hsluv/hsluv-python' && github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + environment: testpypi + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: '3.11' + + - run: python -m pip install build + - run: python -m build + + - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 + with: + repository-url: https://test.pypi.org/legacy/