Skip to content

Commit c79edce

Browse files
Update release.yml (#296)
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 <[email protected]>
1 parent cc217a0 commit c79edce

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/release.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Set up Python
20-
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa
21-
with:
22-
python-version: '3.10'
23-
cache: 'pip'
24-
2519
- name: Get previous version
2620
id: prevver
2721
run: |
@@ -34,6 +28,13 @@ jobs:
3428
spec_version=`grep -oP 'VERSION \K(\d+\.\d+\.\d+)' tuf-spec.md`
3529
echo "spec_version=$spec_version" >> $GITHUB_OUTPUT
3630
31+
- name: Set up Python
32+
if: steps.getver.outputs.spec_version != steps.prevver.outputs.prev_version
33+
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa
34+
with:
35+
python-version: '3.10'
36+
cache: 'pip'
37+
3738
- name: Make release
3839
if: steps.getver.outputs.spec_version != steps.prevver.outputs.prev_version
3940
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e

0 commit comments

Comments
 (0)