From 9bd2091e94af5bd38c3630e6d0e4eca32872fa73 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Thu, 24 Oct 2024 13:14:47 +0100 Subject: [PATCH] Reintroduced tag grabbing --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d48211..e8bc087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,20 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Get the latest tag and date + id: version_info + run: | + echo "tag=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_ENV + echo "date=$(date +"(%d-%m-%Y)")" >> $GITHUB_ENV + - name: Check if WallGoMatrix version matches GitHub tag run: | WallGoMatrixVersion=$(sed -n 's/^\([[:space:]]*\)"Version" -> "\([^.]*\)\.\([^.]*\)\.\([^.]\)",/v\2.\3.\4/p' src/PacletInfo.m) - if [ "$WallGoMatrixVersion" == "${{ github.ref }}" ]; then + if [ "$WallGoMatrixVersion" == "${{ env.tag }}" ]; then echo "WallGoMatrixVersion matches the tag" else - echo "Error: WallGoMatrixVersion ($WallGoMatrixVersion) does not match tag (${{ github.ref }})" 1>&2 + echo "Error: WallGoMatrixVersion ($WallGoMatrixVersion) does not match tag (${{ env.tag }})" 1>&2 exit 64 fi