Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions .github/workflows/hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ jobs:
id: semver
run: |
set -e

# Récupérer le dernier tag vX.Y.Z
LATEST_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)

if [[ -z "$LATEST_TAG" ]]; then
VERSION="0.0.1"
else
Expand All @@ -44,40 +41,27 @@ jobs:
PATCH=$((PATCH + 1))
VERSION="$MAJOR.$MINOR.$PATCH"
fi

TAG="v$VERSION"

# Vérifier si le tag existe déjà
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT

- name: 'Créer le tag et la release si sur main'
if: steps.semver.outputs.skip != 'true' && github.event.pull_request.base.ref == 'main'
run: |
echo "Récupération du changelog pour ${{ steps.semver.outputs.tag }}"
# Extraire le changelog correspondant à la version
RELEASE_NOTES=$(awk "/^## \[${{ steps.semver.outputs.tag }}\]/ {flag=1; next} /^## / {flag=0} flag" CHANGELOG.md)
echo "$RELEASE_NOTES" > release_notes.md

# Créer le tag
echo "Extraction du changelog pour ${{ steps.semver.outputs.tag }}"
if [[ -f CHANGELOG.md ]]; then
sed -n "/^## \[${{ steps.semver.outputs.tag }}\]/,/^## /p" CHANGELOG.md > release_notes.txt
else
echo "${{ steps.semver.outputs.version }}" > release_notes.txt
fi
git tag "${{ steps.semver.outputs.tag }}"
git push origin "${{ steps.semver.outputs.tag }}"

- name: 'Créer une release GitHub'
if: steps.semver.outputs.skip != 'true' && github.event.pull_request.base.ref == 'main'
uses: ncipollo/release-action@v1
with:
tag: '${{ steps.semver.outputs.tag }}'
name: 'Hotfix ${{ steps.semver.outputs.tag }}'
body: |
$(cat release_notes.md)

- name: 'PR mergée sur dev'
if: github.event.pull_request.base.ref == 'dev'
run: echo "PR mergée sur dev, aucune release ni tag créé."
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
tag: '${{ steps.semver.outputs.tag }}'
name: 'Release ${{ steps.semver.outputs.tag }}'
name: '${{ steps.semver.outputs.tag }}'
body: '${{ steps.changelog.outputs.release_notes }}'
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changement

- workflow
- README.md

---

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pre-commit install

## 🔁 Workflow Git

Branches : main, develop, feature/*, release/*, hotfix/*
Branches : main, dev, feat/, fix/, hotfix/

Commits normalisés (Conventional Commits)

Expand All @@ -134,8 +134,8 @@ Les contributions sont les bienvenues, même ponctuelles 🙌

## 📈 Suivi & évolutions

- Roadmap basée sur les saisons sportives
- Architecture pensée pour évoluer (PWA, extranet adhérents, statistiques avancées)
Vérifier les l'historique du projet :
[`Projet Github`](https://github.com/users/RustyRory/projects/19)

## 🛡️ Sécurité & conformité

Expand All @@ -147,7 +147,8 @@ Les contributions sont les bienvenues, même ponctuelles 🙌
## 📄 Licence

Projet développé bénévolement pour une association sportive.
Licence à définir (MIT recommandée).
Licence à définir :
[`LICENCE`](/LICENSE)

## ❤️ Remerciements

Expand Down
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ Chaque dossier correspond à une étape clé du cycle projet, de l’idée au co
📁 **[docs/data-conception/](/docs/data-conception/)**

### Contenu
- Dictionnaire de données
- MCD (Modèle Conceptuel de Données)
- MLD (Modèle Logique de Données)
- MPD (Modèle Physique – MongoDB)
- [Dictionnaire de données](/docs/data-conception/data.md)
- [MCD (Modèle Conceptuel de Données)](/docs/data-conception/mcd.md)
- [MLD (Modèle Logique de Données)](/docs/data-conception/mld.md)
- [MPD (Modèle Physique – MongoDB)](/docs/data-conception/mpd.md)
- Règles de gestion des données

### Objectifs
Expand Down