Skip to content

Commit

Permalink
Use GitHub CLI to fetch release information (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOrioli authored Aug 7, 2022
1 parent 651e661 commit d5d59bb
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ jobs:
runs-on: ubuntu-20.04
outputs:
release_tag: ${{ steps.parse.outputs.tag }}
json: ${{ steps.get_latest_release.outputs.data }}
steps:
- uses: octokit/[email protected]
id: get_latest_release
with:
route: GET /repos/godotengine/godot/releases/latest
owner: octokit
repo: request-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- id: parse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(echo '${{ steps.get_latest_release.outputs.data }}' | jq --raw-output .tag_name)
TAG=$(gh release view --repo godotengine/godot --json tagName --jq .tagName)
echo "::set-output name=tag::$TAG"
current:
name: Fetch Current Godot CI release
Expand All @@ -43,7 +36,9 @@ jobs:
if: needs.fetch.outputs.release_tag != needs.current.outputs.release_tag
steps:
- uses: actions/checkout@v3
- run: echo '${{ needs.fetch.outputs.json }}' | jq --raw-output .body | sed 's/\\r\\n/\n/g' > body.txt
- run: gh release view --repo godotengine/godot --json body --jq .body | sed 's/\\r\\n/\n/g' > body.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
git config user.name github-actions
git config user.email [email protected]
Expand Down

0 comments on commit d5d59bb

Please sign in to comment.