mirror of
https://github.com/R0m1k3/TodoFlow.git
synced 2026-10-11 17:28:17 +02:00
Durcit le déclenchement de la release (tags V*/v*) et normalise la version
This commit is contained in:
1 file changed
+7
-2
@@ -3,7 +3,10 @@ name: Release Tauri App
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
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*'
|
||||||
|
- 'V*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -41,8 +44,10 @@ jobs:
|
|||||||
- name: Update version in tauri.conf.json
|
- name: Update version in tauri.conf.json
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
# Retire un préfixe v/V puis ne garde que les 3 premiers segments
|
||||||
if [[ ! "$TAG_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
|
# (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"
|
TAG_VERSION="1.0.0"
|
||||||
fi
|
fi
|
||||||
echo "Updating tauri.conf.json version to $TAG_VERSION"
|
echo "Updating tauri.conf.json version to $TAG_VERSION"
|
||||||
|
|||||||
Reference in new issue
Block a user