Skip to content

Commit

Permalink
Check versions
Browse files Browse the repository at this point in the history
  • Loading branch information
csjones committed Sep 4, 2023
1 parent d538735 commit dbdc9b4
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/check-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@ jobs:
name: Check GitHub Release
runs-on: macOS-13
steps:
- name: Get latest version
- name: Get lastest binary and plugin versions
run: |
echo "TEMPLATE_RELEASE=$(gh release list -R gigabitcoin/template-plugin -L 1)" >> $GITHUB_ENV
echo "BINARY_RELEASE=$(gh release list -R evilmartians/lefthook -L 1)" >> $GITHUB_ENV
SEMANTIC_VERSIONING_REGEX="(v[0-9]+\.[0-9]+\.[0-9]+)|(0\.[0-9]+\.[0-9]+)"
echo "PLUGIN_RELEASE=$(gh release list -R gigabitcoin/template-plugin -L 1)"
echo "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 $TEMPLATE_RELEASE
echo $BINARY_RELEASE
echo $PLUGIN_VERSION
echo $BINARY_VERSION
- name: Print Conditionally
run: |
echo $TEMPLATE_RELEASE
echo $BINARY_RELEASE
if: ${{ env.TEMPLATE_RELEASE == env.BINARY_RELEASE }}
echo $PLUGIN_VERSION
echo $BINARY_VERSION
if: ${{ env.PLUGIN_VERSION == env.BINARY_VERSION }}

0 comments on commit dbdc9b4

Please sign in to comment.