Compare commits
2 Commits
3.0
...
e557315bd5
| Author | SHA1 | Date | |
|---|---|---|---|
| e557315bd5 | |||
| d1902cfbe0 |
@ -29,23 +29,11 @@ jobs:
|
|||||||
- name: 🔧 Préparation de Git (tags)
|
- name: 🔧 Préparation de Git (tags)
|
||||||
run: git fetch --tags
|
run: git fetch --tags
|
||||||
|
|
||||||
- name: 🏷️ Créer le tag si nécessaire
|
|
||||||
run: |
|
|
||||||
TAG="${{ github.event.inputs.tag }}"
|
|
||||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
|
||||||
echo "Le tag $TAG existe déjà, pas besoin de le créer."
|
|
||||||
else
|
|
||||||
git config user.name "github-actions"
|
|
||||||
git config user.email "github-actions@github.com"
|
|
||||||
git tag "$TAG"
|
|
||||||
git push origin "$TAG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 🔖 Détection du tag précédent
|
- name: 🔖 Détection du tag précédent
|
||||||
id: tag-precedent
|
id: tag-precedent
|
||||||
run: |
|
run: |
|
||||||
TARGET_TAG="${{ github.event.inputs.tag }}"
|
CURRENT_TAG="${{ github.event.inputs.tag }}"
|
||||||
TAGS=$(git tag --sort=creatordate)
|
TAGS=$(git tag --sort=-creatordate)
|
||||||
|
|
||||||
if [ -z "$TAGS" ]; then
|
if [ -z "$TAGS" ]; then
|
||||||
echo "Aucun tag existant détecté."
|
echo "Aucun tag existant détecté."
|
||||||
@ -54,13 +42,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PREV_TAG=""
|
PREV_TAG=""
|
||||||
|
FOUND=false
|
||||||
|
|
||||||
for tag in $TAGS; do
|
for tag in $TAGS; do
|
||||||
if [ "$tag" != "$TARGET_TAG" ]; then
|
if [ "$FOUND" = true ]; then
|
||||||
PREV_TAG=$tag
|
PREV_TAG=$tag
|
||||||
else
|
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
if [ "$tag" = "$CURRENT_TAG" ]; then
|
||||||
|
FOUND=true
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "tag_precedent=$PREV_TAG" | tee -a $GITHUB_OUTPUT
|
echo "tag_precedent=$PREV_TAG" | tee -a $GITHUB_OUTPUT
|
||||||
@ -86,6 +77,18 @@ jobs:
|
|||||||
echo "$LOG" >> $GITHUB_OUTPUT
|
echo "$LOG" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: 🏷️ Créer le tag si nécessaire
|
||||||
|
run: |
|
||||||
|
TAG="${{ github.event.inputs.tag }}"
|
||||||
|
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||||
|
echo "Le tag $TAG existe déjà, pas besoin de le créer."
|
||||||
|
else
|
||||||
|
git config user.name "github-actions"
|
||||||
|
git config user.email "github-actions@github.com"
|
||||||
|
git tag "$TAG"
|
||||||
|
git push origin "$TAG"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: 📦 Création de la version sur Gitea
|
- name: 📦 Création de la version sur Gitea
|
||||||
id: creation-release
|
id: creation-release
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user