Skip to content

Commit

Permalink
Use gh release view command instead of api call (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
norwd authored Nov 20, 2024
2 parents d05dd73 + 114788f commit 77e3c03
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ jobs:

- id: latest-release
name: "Get Details of Latest Release"
run: gh api "${ENDPOINT}" --jq "${JQ_QUERY}" | tee -a "${GITHUB_OUTPUT}"
run: gh release view --json "${JQ_PROPS}" --jq "${JQ_QUERY}" | tee -a "${GITHUB_OUTPUT}"
env:
ENDPOINT: '/repos/${{ vars.REPO_WITH_RELEASES }}/releases/latest'
JQ_QUERY: '"tag_name=" + (.tag_name | tostring)'
GH_REPO: '${{ vars.REPO_WITH_RELEASES }}'
JQ_PROPS: 'tagName'
JQ_QUERY: '"tag_name=" + (.tagName | tostring)'

- name: "Generate an authors.yaml file"
run: gh api "${ENDPOINT}" --jq "${JQ_QUERY}" | tee authors.yaml
Expand Down

0 comments on commit 77e3c03

Please sign in to comment.