Skip to content

Commit

Permalink
Update release.yml (#296)
Browse files Browse the repository at this point in the history
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 <trishank.kuppusamy@datadoghq.com>
  • Loading branch information
trishankatdatadog authored Dec 6, 2023
1 parent cc217a0 commit c79edce
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit c79edce

Please sign in to comment.