From 88eea848b36e8a06934e91f7a96459a61f696d03 Mon Sep 17 00:00:00 2001 From: Connor Newton Date: Thu, 29 Aug 2024 10:01:16 +0100 Subject: [PATCH] Add test publish GitHub workflow --- .github/workflows/test-publish-pypi.yaml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test-publish-pypi.yaml diff --git a/.github/workflows/test-publish-pypi.yaml b/.github/workflows/test-publish-pypi.yaml new file mode 100644 index 0000000..94a9615 --- /dev/null +++ b/.github/workflows/test-publish-pypi.yaml @@ -0,0 +1,36 @@ +name: Test publish + +on: push + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + + environment: + name: test-pypi + url: https://test.pypi.org/project/copyright2 + + permissions: + id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - 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@v1.9.0 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} + repository-url: https://test.pypi.org/legacy/