From c13ad78096b8eb8638450a2298dd59663b7ca8a9 Mon Sep 17 00:00:00 2001 From: Siddharth Krishna Date: Sat, 30 Mar 2024 08:33:35 +0200 Subject: [PATCH] CI: Publish to TestPyPI --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9aed4b..2747988 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,3 +170,20 @@ jobs: with: path: ~/.cache/xl2times key: ${{ runner.os }}-py-${{ env.PY_VERSION }}-${{ env.REF_demos-xlsx }}-${{ env.REF_tim }}-${{ env.CACHE_KEY }} + + # ---------- Build package and upload to PyPI + + - name: Build package + working-directory: xl2times + run: | + source .venv/bin/activate + python -m pip install --upgrade build twine + rm -rf dist || true + python -m build + + - name: Download dist built by CI job + # if: startsWith(github.ref, 'refs/tags/v') # Only run on tags `v...` + # if: github.event_name == 'release' && github.event.action == 'created' # TODO use this before merge + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/