From ba935acd20e2aaaee773f3b746013abe41c599e6 Mon Sep 17 00:00:00 2001 From: "Tiffany A. Timbers" Date: Mon, 29 Jan 2024 16:10:32 -0800 Subject: [PATCH] Added if statement to test install from TestPyPI This if statement prevents a test install from TestPyPI if the PSR action did not create a new release. This is useful because it saves time, as well as prevents errors if no TestPyPI repository yet exists and PSR didn't make a version bump (can happen at the beginning of a project). --- {{ cookiecutter.__package_slug }}/.github/workflows/ci-cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{ cookiecutter.__package_slug }}/.github/workflows/ci-cd.yml b/{{ cookiecutter.__package_slug }}/.github/workflows/ci-cd.yml index aca60b4..215807a 100644 --- a/{{ cookiecutter.__package_slug }}/.github/workflows/ci-cd.yml +++ b/{{ cookiecutter.__package_slug }}/.github/workflows/ci-cd.yml @@ -74,6 +74,7 @@ jobs: password: {% raw %}${{ secrets.TEST_PYPI_API_TOKEN }}{% endraw %} - name: Test install from TestPyPI + if: steps.release.outputs.released == 'true' run: | pip install \ --index-url https://test.pypi.org/simple/ \