From d888f9568ea0fbd962a2a470b6a4ffd0964d509a Mon Sep 17 00:00:00 2001 From: Andrew Yates Date: Sun, 30 Jun 2024 10:45:20 -0400 Subject: [PATCH] testpypi --- .github/workflows/publish-release.yml | 43 ++++++++++++++------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 51e51f2..11af34a 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -92,27 +92,28 @@ jobs: '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' - ### Uncomment to publish to testpypi on every commit - # publish-to-testpypi: - # name: Publish Python distribution to TestPyPI - # needs: - # - build - # runs-on: ubuntu-latest + publish-to-testpypi: + name: Publish Python distribution to TestPyPI + ### Comment the following line to publish to testpypi on commit + # if: startsWith(github.ref, 'refs/PUBLISH-DISABLED/') + needs: + - build + runs-on: ubuntu-latest - # environment: - # name: testpypi - # url: https://test.pypi.org/p/trecrun + environment: + name: testpypi + url: https://test.pypi.org/p/trecrun - # permissions: - # id-token: write # IMPORTANT: mandatory for trusted publishing + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing - # steps: - # - name: Download all the dists - # uses: actions/download-artifact@v3 - # with: - # name: python-package-distributions - # path: dist/ - # - name: Publish distribution to TestPyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # repository-url: https://test.pypi.org/legacy/ + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/