Dieses Dokument erklärt, wie Sie automatisch Releases erstellen können, einfach durch das Pushen von Commits mit bestimmten Nachrichten.
Verwendet Conventional Commits für vollautomatische Releases.
Reagiert auf spezielle Commit-Messages und Tags.
# Patch Release (1.2.3 → 1.2.4) - Bug-Fixes
git commit -m "fix: behebe Problem mit Datei-Speicherung"
git commit -m "fix(ui): korrigiere Button-Layout"
# Minor Release (1.2.3 → 1.3.0) - Neue Features
git commit -m "feat: füge neue Export-Funktion hinzu"
git commit -m "feat(editor): implementiere Syntax-Highlighting"
# Major Release (1.2.3 → 2.0.0) - Breaking Changes
git commit -m "feat!: ändere API-Struktur komplett"
git commit -m "feat: neue UI
BREAKING CHANGE: Die alte UI ist nicht mehr verfügbar"# Patch Release
git commit -m "fix: behebe kritischen Bug [release]"
git commit -m "Beliebiger Text [release]"
# Minor Release
git commit -m "Neue Funktion hinzugefügt [minor]"
# Major Release
git commit -m "Große Änderungen [major]"- Commit-Analyse → System prüft Commit-Messages
- Version berechnen → Neue Versionsnummer wird ermittelt
- Dateien aktualisieren → VERSION, pyproject.toml, version.py
- Tag erstellen → Git-Tag wird automatisch erstellt
- Release erstellen → GitHub Release mit Artefakten
- Build-Prozess → Python-Pakete werden gebaut
- PyPI-Upload → Automatische Veröffentlichung auf https://pypi.org/project/bash-script-maker/
git add .
git commit -m "fix: behebe Absturz beim Speichern großer Dateien"
git push origin main
# → Automatischer Patch-Release (z.B. 1.2.3 → 1.2.4)git add .
git commit -m "feat: füge Dark Mode hinzu"
git push origin main
# → Automatischer Minor-Release (z.B. 1.2.3 → 1.3.0)git add .
git commit -m "feat!: neue Plugin-API
BREAKING CHANGE: Alte Plugins sind nicht mehr kompatibel"
git push origin main
# → Automatischer Major-Release (z.B. 1.2.3 → 2.0.0)git add .
git commit -m "Verschiedene Verbesserungen [release]"
git push origin main
# → Automatischer Patch-Release| Type | Release | Beschreibung | Beispiel |
|---|---|---|---|
fix: |
Patch | Bug-Fixes | fix: behebe Speicher-Leak |
feat: |
Minor | Neue Features | feat: füge Export-Funktion hinzu |
feat!: |
Major | Breaking Changes | feat!: neue API-Struktur |
docs: |
Kein | Dokumentation | docs: aktualisiere README |
style: |
Kein | Code-Formatierung | style: formatiere mit black |
refactor: |
Kein | Code-Refactoring | refactor: vereinfache Parser |
test: |
Kein | Tests | test: füge Unit-Tests hinzu |
chore: |
Kein | Wartung | chore: aktualisiere Dependencies |
# Semantic Release deaktivieren
mv .github/workflows/semantic-release.yml .github/workflows/semantic-release.yml.disabled
# Simple Auto Release deaktivieren
mv .github/workflows/auto-release-on-push.yml .github/workflows/auto-release-on-push.yml.disabled-
PyPI API Token erstellen:
-
GitHub Secret hinzufügen:
- Repository Settings → Secrets →
PYPI_API_TOKEN
- Repository Settings → Secrets →
# Commit ohne Release
git commit -m "fix: kleine Korrektur [skip ci]"
# Oder für Semantic Release
git commit -m "docs: aktualisiere README" # docs löst keinen Release aushttps://github.com/securebitsorg/bash-script-maker/actions
- Gehen Sie zu Actions
- Wählen Sie den fehlgeschlagenen Workflow
- Klicken Sie auf den Job für Details
Lösung:
- Überprüfen Sie die Commit-Message
- Stellen Sie sicher, dass der Push auf
mainerfolgt - Prüfen Sie die Workflow-Logs
Lösung:
- Überprüfen Sie das
PYPI_API_TOKENSecret - Version könnte bereits auf PyPI existieren
Bearbeiten Sie .releaserc.json für Semantic Release:
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{"type": "docs", "scope": "README", "release": "patch"},
{"type": "refactor", "release": "patch"},
{"scope": "no-release", "release": false}
]
}
]
]
}Bearbeiten Sie .github/workflows/semantic-release.yml oder .github/workflows/auto-release-on-push.yml nach Ihren Bedürfnissen.
- Konsistente Commit-Messages verwenden
- Ein Feature pro Commit für saubere Release-Notes
- Tests vor dem Push ausführen
- Breaking Changes klar kennzeichnen
- Release-Notes im CHANGELOG pflegen
Mit diesen Workflows können Sie:
- ✅ Automatische Releases bei jedem Push
- ✅ Semantic Versioning basierend auf Commits
- ✅ Professionelle Release-Notes
- ✅ Multi-Format Builds (Python)
- ✅ PyPI-Integration
- ✅ Null manueller Aufwand
Einfach committen und pushen - der Rest passiert automatisch! 🚀