From 1dd786604318fbd35f7249452b85726c321e0389 Mon Sep 17 00:00:00 2001 From: dan <1250226+dan-smalley@users.noreply.github.com> Date: Tue, 28 May 2024 13:56:44 -0400 Subject: [PATCH] Add automated upload to TestPyPI - Uses GitHub releases to deploy to TestPyPI --- .../workflows/testPyPI_package_upload.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/testPyPI_package_upload.yaml diff --git a/.github/workflows/testPyPI_package_upload.yaml b/.github/workflows/testPyPI_package_upload.yaml new file mode 100644 index 0000000..b205468 --- /dev/null +++ b/.github/workflows/testPyPI_package_upload.yaml @@ -0,0 +1,38 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: TestPyPI Package Upload + +on: + release: + types: [published] + +jobs: + testpypi_upload: + runs-on: ubuntu-latest + environment: + name: testpypi + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/