-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.11 KB
/
check-github-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
name: Check GitHub Release
on:
schedule:
# Daily at 8:20 UTC
- cron: '20 8 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check:
name: Check GitHub Release
runs-on: macOS-13
steps:
- name: Get lastest binary and plugin versions
run: |
SEMANTIC_VERSIONING_REGEX="(v[0-9]+\.[0-9]+\.[0-9]+)|(0\.[0-9]+\.[0-9]+)"
PLUGIN_RELEASE=$(gh release list -R gigabitcoin/template-plugin -L 1)
BINARY_RELEASE=$(gh release list -R evilmartians/lefthook -L 1)
echo "PLUGIN_VERSION=$(echo $PLUGIN_RELEASE | grep -oE $SEMANTIC_VERSIONING_REGEX | head -n1)" >> $GITHUB_ENV
echo "BINARY_VERSION=$(echo $BINARY_RELEASE | grep -oE $SEMANTIC_VERSIONING_REGEX | head -n1)" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Print Variables
run: |
echo $PLUGIN_VERSION
echo $BINARY_VERSION
- name: Print Conditionally
run: |
echo $PLUGIN_VERSION
echo $BINARY_VERSION
if: ${{ env.PLUGIN_VERSION == env.BINARY_VERSION }}