Skip to content

Commit 47fff91

Browse files
committed
chore: remove version badges, add README sync workflow
1 parent e81659e commit 47fff91

3 files changed

Lines changed: 55 additions & 13 deletions

File tree

.github/workflows/sync-readmes.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Sync READMEs across branches
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- 1.20.x
8+
- 1.21.x
9+
- 26.1.x
10+
paths:
11+
- README.md
12+
- README_FR.md
13+
14+
jobs:
15+
sync:
16+
if: ${{ !contains(github.event.head_commit.message, '[skip sync]') }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout source branch
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Configure git
25+
run: |
26+
git config user.name "github-actions[bot]"
27+
git config user.email "github-actions[bot]@users.noreply.github.com"
28+
29+
- name: Sync READMEs to all branches
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
SOURCE_BRANCH="${GITHUB_REF#refs/heads/}"
34+
TARGETS=("dev" "1.20.x" "1.21.x" "26.1.x")
35+
36+
for target in "${TARGETS[@]}"; do
37+
if [ "$target" = "$SOURCE_BRANCH" ]; then
38+
continue
39+
fi
40+
41+
if git show-ref --verify --quiet refs/remotes/origin/"$target"; then
42+
git checkout "$target"
43+
git checkout "$SOURCE_BRANCH" -- README.md README_FR.md
44+
if ! git diff --cached --quiet; then
45+
git commit -m "docs: sync READMEs from $SOURCE_BRANCH [skip sync]"
46+
git push origin "$target"
47+
fi
48+
fi
49+
done

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# StackableTools (Kotlin Edition)
22

3-
[![Minecraft Version](https://img.shields.io/badge/Minecraft-1.21-blue.svg?style=for-the-badge&logo=minecraft)](https://www.minecraft.net/)
4-
[![Minecraft Version](https://img.shields.io/badge/Minecraft-1.21.1-blue.svg?style=for-the-badge&logo=minecraft)](https://www.minecraft.net/)
5-
[![Minecraft Version](https://img.shields.io/badge/Minecraft-1.21.4-blue.svg?style=for-the-badge&logo=minecraft)](https://www.minecraft.net/)
6-
[![Minecraft Version](https://img.shields.io/badge/Minecraft-1.21.11-blue.svg?style=for-the-badge&logo=minecraft)](https://www.minecraft.net/)
7-
8-
93
[![Fabric API](https://img.shields.io/badge/Loader-Fabric-orange.svg?style=for-the-badge)](https://fabricmc.net/)
104
[![License](https://img.shields.io/badge/License-CC0_1.0-green.svg?style=for-the-badge)](https://github.com/yoanndev90/StackableTools/blob/master/LICENSE)
115
[![GitHub Release](https://img.shields.io/github/v/release/YoannDev90/StackableTools?style=for-the-badge)](https://github.com/yoanndev90/StackableTools/releases)

README_FR.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# StackableTools (Édition Kotlin)
22

3-
[![Version Minecraft](https://img.shields.io/badge/Minecraft-1.20-1.20.4-blue.svg?style=for-the-badge&logo=minecraft)](https://www.minecraft.net/)
43
[![Fabric API](https://img.shields.io/badge/Loader-Fabric-orange.svg?style=for-the-badge)](https://fabricmc.net/)
54
[![Licence](https://img.shields.io/badge/License-CC0_1.0-green.svg?style=for-the-badge)](https://github.com/yoann/StackableTools/blob/master/LICENSE)
65
[![Release GitHub](https://img.shields.io/github/v/release/yoann/StackableTools?style=for-the-badge)](https://github.com/yoann/StackableTools/releases)
@@ -21,12 +20,12 @@
2120
## Support des versions
2221
| Version Minecraft | Fabric Loader | Fabric API | Statut | Remarques |
2322
| :---------------- | :------------ | :--------- | :----------- | :------------------------------------ |
24-
| 1.20.0 | ≥0.18.5 | ≥0.97.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
25-
| 1.20.1 | ≥0.18.5 | ≥0.97.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
26-
| 1.20.2 | ≥0.18.5 | ≥0.97.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
27-
| 1.20.3 | ≥0.18.5 | ≥0.97.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
28-
| 1.20.4 | ≥0.18.5 | ≥0.97.3 |**Testé** | Complètement testé & recommandé |
29-
| 1.20.5+ | ≥0.18.5 |1.0.0 | ⚠️ Non testé | Peut nécessiter des mises à jour |
23+
| 1.21 | ≥0.16.9 | ≥0.107.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
24+
| 1.21.1 | ≥0.16.9 | ≥0.107.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
25+
| 1.21.2 | ≥0.16.9 | ≥0.107.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
26+
| 1.21.3 | ≥0.16.9 | ≥0.107.0 | ✅ Compatible | Testé par la communauté (non vérifié) |
27+
| 1.21.4 | ≥0.16.10 | ≥0.117.0 |**Testé** | Complètement testé & recommandé |
28+
| 1.21.5+ | ≥0.16.14 |0.120.0 | ⚠️ Non testé | Peut nécessiter des mises à jour |
3029

3130
## Fonctionnalités principales
3231
- **Outils empilables** : Épées, pioches, pelles, haches et plus sont désormais empilables !

0 commit comments

Comments
 (0)