From 2a34ee3a386e6eff55bc242217a9dc5b81ecbac9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 31 May 2026 08:39:04 +0000 Subject: [PATCH] =?UTF-8?q?Durcit=20le=20d=C3=A9clenchement=20de=20la=20re?= =?UTF-8?q?lease=20(tags=20V*/v*)=20et=20normalise=20la=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53020b1..96d167d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,10 @@ name: Release Tauri App on: push: tags: + # Accepte les tags en minuscule (v1.1.0) comme en majuscule (V1.1.0), + # pour éviter qu'une faute de casse empêche le déclenchement du build. - 'v*' + - 'V*' workflow_dispatch: jobs: @@ -41,8 +44,10 @@ jobs: - name: Update version in tauri.conf.json shell: bash run: | - TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') - if [[ ! "$TAG_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then + # Retire un préfixe v/V puis ne garde que les 3 premiers segments + # (ex. "V1.1.0.0" -> "1.1.0") afin de produire une version semver valide. + TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^[vV]//' | cut -d. -f1-3) + if [[ ! "$TAG_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then TAG_VERSION="1.0.0" fi echo "Updating tauri.conf.json version to $TAG_VERSION"