From e1743a83785d548e66f734b59ea251efad0f4644 Mon Sep 17 00:00:00 2001 From: chainchad <96362174+chainchad@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:33:30 -0500 Subject: [PATCH] Add failing step if ccip release type does not have a matching package version --- .github/workflows/build-publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index d892bf176fd..2889ee5e5ea 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -36,6 +36,16 @@ jobs: echo "git-tag-type=core" | tee -a "$GITHUB_OUTPUT" echo "ecr-image-name=chainlink/chainlink" | tee -a "$GITHUB_OUTPUT" fi + - name: Fail if CCIP release has wrong version + if: ${{ steps.check-git-tag-type.outputs.git-tag-type == 'ccip' }} + run: | + version=$(jq -r '.version' ./package.json) + echo "Package version: $version" + echo "Git tag type: ${{ steps.check-git-tag-type.outputs.git-tag-type }}" + if [[ $version != *"-ccip"* ]]; then + echo "Error: Version '$version' does not match required CCIP format." + exit 1 + fi - name: Check for VERSION file bump on tags # Avoids checking VERSION file bump on forks or from CCIP releases. if: ${{ github.repository == 'smartcontractkit/chainlink' && steps.check-git-tag-type.outputs.git-tag-type == 'core' }}