Compare commits
2 Commits
70ee9ee52a
...
3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bbf9eb8d7 | |||
| f39ff35e93 |
@ -29,11 +29,23 @@ 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: |
|
||||||
CURRENT_TAG="${{ github.event.inputs.tag }}"
|
TARGET_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é."
|
||||||
@ -42,19 +54,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PREV_TAG=""
|
PREV_TAG=""
|
||||||
FOUND=false
|
|
||||||
|
|
||||||
for tag in $TAGS; do
|
for tag in $TAGS; do
|
||||||
if [ "$FOUND" = true ]; then
|
if [ "$tag" != "$TARGET_TAG" ]; 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" >> $GITHUB_OUTPUT
|
echo "tag_precedent=$PREV_TAG" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: 📝 Liste des modifications
|
- name: 📝 Liste des modifications
|
||||||
id: changelog
|
id: changelog
|
||||||
@ -77,18 +86,6 @@ 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