From 0d035d793a5deb8e388a843f13ed311a7b1f4681 Mon Sep 17 00:00:00 2001 From: Trishank Karthik Kuppusamy Date: Wed, 6 Dec 2023 10:45:10 -0500 Subject: [PATCH] Update release.yml Defer setting up Python (and, more importantly, failing to clean up a nonexistent pip cache dir when no Python packages have been installed) if there is no new spec to release Signed-off-by: Trishank Karthik Kuppusamy --- .github/workflows/release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30876f9..cacc367 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,12 +16,6 @@ jobs: with: fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa - with: - python-version: '3.10' - cache: 'pip' - - name: Get previous version id: prevver run: | @@ -34,6 +28,13 @@ jobs: spec_version=`grep -oP 'VERSION \K(\d+\.\d+\.\d+)' tuf-spec.md` echo "spec_version=$spec_version" >> $GITHUB_OUTPUT + - name: Set up Python + if: steps.getver.outputs.spec_version != steps.prevver.outputs.prev_version + uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa + with: + python-version: '3.10' + cache: 'pip' + - name: Make release if: steps.getver.outputs.spec_version != steps.prevver.outputs.prev_version uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e