Skip to content

Commit

Permalink
Fix spec generation action following GitHub change (#261)
Browse files Browse the repository at this point in the history
* ci: update release workflow for recent GHA changes

GitHub Actions are deprecating the set-output workflow command in favour
of environmental files. Update the release workflow to use the new
mechanism for saving output from a step.

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Fixes: #259

Signed-off-by: Joshua Lock <[email protected]>

* ci: pin python-version we use to generate the published spec

Some dependencies we need do not yet have wheels available for Python 3.11
which is installed by the '3.x' version selector.

Signed-off-by: Joshua Lock <[email protected]>

Signed-off-by: Joshua Lock <[email protected]>
  • Loading branch information
joshuagl authored Dec 13, 2022
1 parent 2443fba commit d6f0d36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5
with:
python-version: 3.x
python-version: '3.10'
cache: pip

- name: Clone
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5
with:
python-version: 3.x
python-version: '3.10'
cache: pip

- name: Ensure changes build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
- name: Set up Python
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5
with:
python-version: 3.x
python-version: '3.10'
cache: 'pip'

- name: Get previous version
id: prevver
run: |
prev_version=`git tag | sort -V -r | head -n 1 | cut -c 2-`
echo "::set-output name=prev_version::$(echo -n $prev_version)"
echo "prev_version=$prev_version" >> $GITHUB_OUTPUT
- name: Get version
id: getver
run: |
spec_version=`grep -oP 'VERSION \K(\d+\.\d+\.\d+)' tuf-spec.md`
echo "::set-output name=spec_version::$(echo -n $spec_version)"
echo "spec_version=$spec_version" >> $GITHUB_OUTPUT
- name: Make release
if: steps.getver.outputs.spec_version != steps.prevver.outputs.prev_version
Expand Down

0 comments on commit d6f0d36

Please sign in to comment.