.github/workflows/check-github-release.yml #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |