From acbc5dcc6d1d2bb022c32fedab0bfb0a8c71702e Mon Sep 17 00:00:00 2001 From: dankeboy36 Date: Thu, 19 Feb 2026 13:23:09 +0100 Subject: [PATCH] chore(ci): harden git fetch for semantic-release Signed-off-by: dankeboy36 --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7583b5..85b42b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,15 @@ jobs: with: persist-credentials: false fetch-depth: 0 + fetch-tags: true + + - name: Ensure full git history and tags + run: | + set -euo pipefail + git fetch --force --tags --prune --unshallow || git fetch --force --tags --prune + git fetch --force origin '+refs/heads/*:refs/remotes/origin/*' + git rev-parse --is-shallow-repository + git fsck --full - name: Use Node.js uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0