Compare commits
2 Commits
3.0
...
e557315bd5
| Author | SHA1 | Date | |
|---|---|---|---|
| e557315bd5 | |||
| d1902cfbe0 |
@ -29,23 +29,11 @@ jobs:
|
||||
- name: 🔧 Préparation de Git (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
|
||||
id: tag-precedent
|
||||
run: |
|
||||
TARGET_TAG="${{ github.event.inputs.tag }}"
|
||||
TAGS=$(git tag --sort=creatordate)
|
||||
CURRENT_TAG="${{ github.event.inputs.tag }}"
|
||||
TAGS=$(git tag --sort=-creatordate)
|
||||
|
||||
if [ -z "$TAGS" ]; then
|
||||
echo "Aucun tag existant détecté."
|
||||
@ -54,13 +42,16 @@ jobs:
|
||||
fi
|
||||
|
||||
PREV_TAG=""
|
||||
FOUND=false
|
||||
|
||||
for tag in $TAGS; do
|
||||
if [ "$tag" != "$TARGET_TAG" ]; then
|
||||
if [ "$FOUND" = true ]; then
|
||||
PREV_TAG=$tag
|
||||
else
|
||||
break
|
||||
fi
|
||||
if [ "$tag" = "$CURRENT_TAG" ]; then
|
||||
FOUND=true
|
||||
fi
|
||||
done
|
||||
|
||||
echo "tag_precedent=$PREV_TAG" | tee -a $GITHUB_OUTPUT
|
||||
@ -86,6 +77,18 @@ jobs:
|
||||
echo "$LOG" >> $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
|
||||
id: creation-release
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user