-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 1.15 KB
/
check-for-new-deno-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
on:
workflow_dispatch:
schedule:
- cron: "18 0 * * *"
jobs:
check:
runs-on: ubuntu-latest
outputs:
latest-deno-version: ${{ steps.check.outputs.latest-deno-version }}
release-status: ${{ steps.check.outputs.release-status }}
steps:
- name: Check for new deno release
id: check
run: |
latest_deno_version=$(gh release view --repo denoland/deno --json tagName --jq ".tagName")
echo "latest-deno-version=$latest_deno_version" >> "$GITHUB_OUTPUT"
version_in_this_repo=$(gh release view $latest_deno_version --repo ${{ github.repository }} --json tagName --jq ".tagName" || true)
if [[ "${latest_deno_version}" == "${version_in_this_repo}" ]]
then
echo "release-status=exists" >> "$GITHUB_OUTPUT"
else
echo "release-status=new" >> "$GITHUB_OUTPUT"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
needs:
- check
if: ${{ needs.check.outputs.release-status == 'new' }}
uses: ./.github/workflows/build.yml
with:
deno-version: ${{ needs.check.outputs.latest-deno-version }}