From 7c8764d0f091ff7ba79ab8b6ebce8a951df42fb7 Mon Sep 17 00:00:00 2001 From: kailinzhuang Date: Wed, 27 Aug 2025 17:22:15 -0700 Subject: [PATCH] add `release_pypi.yml` to worklows --- .github/workflows/release_pypi.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release_pypi.yml diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml new file mode 100644 index 0000000..c09a387 --- /dev/null +++ b/.github/workflows/release_pypi.yml @@ -0,0 +1,37 @@ +name: Publish python package to testPyPI + +on: + release: + types: [published] + +jobs: + publish-to-testpypi: + name: Publish release to testPyPI + runs-on: ubuntu-latest + environment: + name: testrelease + url: https://test.pypi.org/p/DynamicalComponentsAnalysis/ + permissions: + id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + python -m pip install build + + - name: Build package + run: python -m build + + - name: Publish package distributions to testPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file