Skip to content

Commit

Permalink
Fix approach for getting latest runtime tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Sep 9, 2024
1 parent 0739e72 commit da96548
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,15 @@ jobs:
id: latest-release
# We're making an assumption that the latest runtime release will be within the last 30 releases
run: |
latest_runtime_tag=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases | \
jq -r 'map(select(.name | test("(^runtime-\\d{4,}$)|(^v\\d+\\.\\d+\\.\\d+$)"; "i")))[0] | .tag_name')
releases=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases)
latest_runtime_tag=$(echo "$releases" | jq -r '
[
.[] | select(.name | test("^runtime-\\d{4,}$"; "i")) | .tag_name,
.[] | select(.name | test("^v\\d+\\.\\d+\\.\\d+$"; "i")) | .tag_name
] | first
')
echo "latest_runtime_tag=$latest_runtime_tag" >> $GITHUB_OUTPUT
- name: Generate Release Body
Expand Down

0 comments on commit da96548

Please sign in to comment.