diff --git a/.github/workflows/publish_testpypi.yaml b/.github/workflows/publish_testpypi.yaml new file mode 100644 index 0000000..71c9952 --- /dev/null +++ b/.github/workflows/publish_testpypi.yaml @@ -0,0 +1,33 @@ +name: Publish to TestPyPi + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish to TestPyPi + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} + run: | + python -m twine upload --repository testpypi dist/*