From 8d71beeaf9a5ea998e4e5c8cb10d4848fe9c7cf6 Mon Sep 17 00:00:00 2001 From: Simone Cottini Date: Tue, 19 Dec 2023 14:00:41 +0100 Subject: [PATCH] Need to check release tag_name in CI --- .github/workflows/cd.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d0acf96..bf3d054 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,12 +23,12 @@ jobs: run: mix deps.get - name: get tag run: | - REDACT_EX_VERSION_REPO=$(grep -m1 version mix.exs | cut -d'"' -f2) - echo "REDACT_EX_VERSION_REPO=$REDACT_EX_VERSION_REPO" >> $GITHUB_ENV - - name: check tags - if: github.ref_tag != ${{ env.REDACT_EX_VERSION_REPO }} + VERSION=$(grep -m1 version mix.exs | cut -d'"' -f2) + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: check version + if: ${{ github.event.release.tag_name != env.VERSION }} run: | - echo "Github ref tag [${{ github.ref_tag }}] is different from mix.exs version [${{ env.REDACT_EX_VERSION_REPO }}]" + echo "Github ref tag [${{ github.event.release.tag_name }}] is different from mix.exs version [${{ env.VERSION }}]" exit 1 - name: Login to hex.pm run: |