Skip to content

Commit af051ec

Browse files
author
marci
committed
fix: github-release
1 parent 368e5ba commit af051ec

File tree

5 files changed

+114
-28
lines changed

5 files changed

+114
-28
lines changed

.github/workflows/ci-cd.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,12 @@ jobs:
132132
path: dist/
133133

134134
- name: Publish to PyPI
135-
if: github.repository_owner == 'securebitsorg' && github.event_name == 'release' && github.event.action == 'published' && env.PYPI_API_TOKEN != ''
135+
if: github.repository_owner == 'securebitsorg' && github.event_name == 'release' && github.event.action == 'published' && secrets.PYPI_API_TOKEN != ''
136136
env:
137137
TWINE_USERNAME: __token__
138-
TWINE_PASSWORD: ${{ env.PYPI_API_TOKEN }}
138+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
139139
run: |
140140
python -m twine upload dist/*
141-
python -m twine upload dist/*
142-
143-
144-
# Stellen Sie sicher, dass das PyPI-Token als Secret gesetzt ist.
145141
146142
- name: Publish to GitHub Packages
147143
if: github.repository_owner == 'securebitsorg'
@@ -282,17 +278,29 @@ jobs:
282278
python -m pip install --upgrade pip
283279
pip install python-semantic-release
284280
281+
- name: Check for existing tags
282+
id: check-tags
283+
run: |
284+
if git describe --tags --abbrev=0 2>/dev/null; then
285+
echo "has_tags=true" >> $GITHUB_OUTPUT
286+
else
287+
echo "has_tags=false" >> $GITHUB_OUTPUT
288+
fi
289+
290+
- name: Create initial tag if none exists
291+
if: steps.check-tags.outputs.has_tags == 'false'
292+
run: |
293+
git config --global user.name "github-actions[bot]"
294+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
295+
git tag v1.1.0
296+
git push origin v1.1.0
297+
285298
- name: Semantic Release
286299
env:
287300
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
288301
run: |
289302
git config --global user.name "github-actions[bot]"
290303
git config --global user.email "github-actions[bot]@users.noreply.github.com"
291-
# Create an initial tag if no tags are present
292-
if ! git describe --tags --abbrev=0; then
293-
git tag v0.1.0
294-
git push origin v0.1.0
295-
fi
296304
semantic-release publish
297305
298306
# Finish

.releaserc.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Configuration for semantic-release
2+
branches:
3+
- main
4+
5+
plugins:
6+
- "@semantic-release/commit-analyzer"
7+
- "@semantic-release/release-notes-generator"
8+
- "@semantic-release/changelog"
9+
- "@semantic-release/github"
10+
11+
preset: "conventionalcommits"
12+
13+
presetConfig:
14+
types:
15+
- type: "feat"
16+
section: "✨ Features"
17+
- type: "fix"
18+
section: "🐛 Bug Fixes"
19+
- type: "docs"
20+
section: "📚 Documentation"
21+
- type: "style"
22+
section: "💎 Styles"
23+
- type: "refactor"
24+
section: "♻️ Code Refactoring"
25+
- type: "perf"
26+
section: "⚡ Performance Improvements"
27+
- type: "test"
28+
section: "✅ Tests"
29+
- type: "chore"
30+
section: "🔧 Chores"
31+
- type: "ci"
32+
section: "👷 CI/CD"
33+
34+
releaseRules:
35+
- type: "feat"
36+
release: "minor"
37+
- type: "fix"
38+
release: "patch"
39+
- type: "perf"
40+
release: "patch"
41+
- type: "docs"
42+
release: false
43+
- type: "style"
44+
release: false
45+
- type: "refactor"
46+
release: false
47+
- type: "test"
48+
release: false
49+
- type: "chore"
50+
release: false
51+
- type: "ci"
52+
release: false
53+
54+
changelog:
55+
changelogFile: "CHANGELOG.md"
56+
57+
github:
58+
successComment: false
59+
failComment: false
60+
releasedLabels: false

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ und dieses Projekt verwendet [Semantic Versioning](https://semver.org/spec/v2.0.
2727
### Fixed
2828
- Verschiedene Bugfixes und Verbesserungen
2929

30-
## [1.0.1] - 2025-09-01
30+
## [1.1.0] - 2025-09-01
3131

3232
### Added
3333
- Erste stabile Version von Bash-Script-Maker

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
Ein benutzerfreundliches GUI-Programm zur Erstellung von Bash-Scripts mit visueller Unterstützung.
44

55
[![CI/CD Pipeline](https://github.com/securebitsorg/Bash-Script-Maker/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/securebitsorg/Bash-Script-Maker/actions/workflows/ci-cd.yml)
6-
[![PyPI Version](https://img.shields.io/badge/pypi-v1.1.0-blue)](https://pypi.org/project/bash-script-maker/)
7-
[![Python Versions](https://img.shields.io/badge/python-3.8+-blue.svg)](https://pypi.org/project/bash-script-maker/)
8-
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9-
[![GitHub last commit](https://img.shields.io/github/last-commit/securebitsorg/Bash-Script-Maker.svg)](https://github.com/securebitsorg/Bash-Script-Maker/commits/main)
6+
[![GitHub Release](https://img.shields.io/github/v/release/securebitsorg/Bash-Script-Maker?include_prereleases&sort=semver)](https://github.com/securebitsorg/Bash-Script-Maker/releases)
7+
[![PyPI Version](https://img.shields.io/pypi/v/bash-script-maker)](https://pypi.org/project/bash-script-maker/)
8+
[![Python Versions](https://img.shields.io/pypi/pyversions/bash-script-maker)](https://pypi.org/project/bash-script-maker/)
9+
[![License](https://img.shields.io/github/license/securebitsorg/Bash-Script-Maker)](https://opensource.org/licenses/MIT)
10+
[![GitHub last commit](https://img.shields.io/github/last-commit/securebitsorg/Bash-Script-Maker)](https://github.com/securebitsorg/Bash-Script-Maker/commits/main)
11+
[![Downloads](https://img.shields.io/github/downloads/securebitsorg/Bash-Script-Maker/total)](https://github.com/securebitsorg/Bash-Script-Maker/releases)
12+
[![Issues](https://img.shields.io/github/issues/securebitsorg/Bash-Script-Maker)](https://github.com/securebitsorg/Bash-Script-Maker/issues)
1013

1114
## Features
1215

@@ -214,24 +217,31 @@ Das Programm erstellt automatisch ein grundlegendes Script-Template:
214217

215218
## CI/CD Pipeline
216219

217-
Dieses Projekt verwendet GitHub Actions für kontinuierliche Integration und Bereitstellung.
218-
219-
220-
Check failure on line 144 in .github/workflows/ci-cd.yml
221-
GitHub Actions / .github/workflows/ci-cd.yml
222-
223-
Invalid workflow file
224-
225-
You have an error in your yaml syntax on line 144
226-
220+
Dieses Projekt verwendet GitHub Actions für kontinuierliche Integration und automatische Releases.
227221

228222
- **CI/CD Pipeline** (`.github/workflows/ci-cd.yml`):
229-
- Tests auf Python 3.6-3.11
223+
- Tests auf Python 3.8-3.12
230224
- Code-Qualität-Checks (Flake8, Black, MyPy)
231-
- Automatische Releases
225+
- **Automatische Releases mit semantic-release**
232226
- Package-Publishing zu PyPI und GitHub Packages
233227
- Docker-Image-Erstellung
234228
- Dokumentationsgenerierung
229+
- Sicherheitsscans (Bandit, Safety)
230+
231+
### Automatische Releases
232+
233+
Das Projekt verwendet [Conventional Commits](https://www.conventionalcommits.org/) für automatische Versionierung:
234+
235+
- `feat:` → Minor Release (1.1.0 → 1.2.0)
236+
- `fix:` → Patch Release (1.1.0 → 1.1.1)
237+
- `BREAKING CHANGE:` → Major Release (1.1.0 → 2.0.0)
238+
239+
**Beispiel-Commits:**
240+
```bash
241+
git commit -m "feat: add new syntax highlighting theme"
242+
git commit -m "fix: resolve tab indentation bug"
243+
git commit -m "docs: update installation instructions"
244+
```
235245

236246
- **Security Scan** (`.github/workflows/security-scan.yml`):
237247
- Security-Scans mit Bandit und Safety

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ build_command = "pip install build && python -m build"
9292
major_on_zero = false
9393
tag_format = "v{version}"
9494

95+
[tool.semantic_release.branches.main]
96+
match = "main"
97+
prerelease = false
98+
99+
[tool.semantic_release.changelog]
100+
template_dir = "templates"
101+
changelog_file = "CHANGELOG.md"
102+
95103
[tool.semantic_release.commit_parser_options]
96104
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore"]
97105
minor_tags = ["feat"]

0 commit comments

Comments
 (0)