Skip to content

Commit 9e8d08a

Browse files
author
marci
committed
fix: bug-fixes
1 parent 6608585 commit 9e8d08a

File tree

1 file changed

+3
-53
lines changed

1 file changed

+3
-53
lines changed

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -262,74 +262,24 @@ jobs:
262262
steps:
263263
- uses: actions/checkout@v4
264264
with:
265-
fetch-depth: 0
266-
fetch-tags: true
265+
fetch-depth: 0 # WICHTIG: Volle Historie für semantic-release
267266
token: ${{ secrets.GITHUB_TOKEN }}
268267

269268
- name: Set up Python
270269
uses: actions/setup-python@v4
271270
with:
272271
python-version: ${{ env.PYTHON_VERSION }}
273272

274-
- name: Install semantic-release
273+
- name: Configure Git
275274
run: |
276-
python -m pip install --upgrade pip
277-
pip install python-semantic-release
278-
279-
- name: Debug Git History
280-
run: |
281-
echo "=== Git Tags ==="
282-
git tag --list
283-
echo "=== Recent Commits ==="
284-
git log --oneline -10
285-
echo "=== Commits since v1.1.0 ==="
286-
git log --oneline v1.1.0..HEAD || echo "No commits since v1.1.0 found"
287-
288-
- name: Ensure baseline tag exists when missing
289-
env:
290-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
291-
run: |
292-
set -e
293-
git fetch --tags --force
294-
# Set committer identity for creating tags
295275
git config user.name "github-actions[bot]"
296276
git config user.email "github-actions[bot]@users.noreply.github.com"
297-
EXISTING_TAGS=$(git tag -l 'v*' | wc -l)
298-
if [ "$EXISTING_TAGS" -eq 0 ]; then
299-
echo "No tags found. Creating baseline tag from VERSION file."
300-
BASELINE_VERSION=$(cat VERSION | tr -d '\n\r')
301-
if [ -z "$BASELINE_VERSION" ]; then
302-
echo "VERSION file empty or missing" && exit 1
303-
fi
304-
BASELINE_TAG="v${BASELINE_VERSION}"
305-
# Falls Tag lokal bereits existiert, nicht neu erstellen
306-
if git rev-parse -q --verify "refs/tags/$BASELINE_TAG" >/dev/null; then
307-
echo "Baseline tag $BASELINE_TAG already exists locally; skipping creation"
308-
else
309-
# Prüfe, ob Tag bereits auf Remote existiert
310-
if git ls-remote --exit-code --tags origin "$BASELINE_TAG" >/dev/null 2>&1; then
311-
echo "Baseline tag $BASELINE_TAG exists on remote; syncing local tags and skipping creation"
312-
git fetch --tags --force
313-
else
314-
echo "Creating baseline tag ${BASELINE_TAG} at HEAD"
315-
git tag -a "$BASELINE_TAG" -m "chore(release): baseline $BASELINE_TAG"
316-
git push origin "$BASELINE_TAG"
317-
fi
318-
fi
319-
else
320-
echo "Found existing tags; skipping baseline creation"
321-
fi
322277
323278
- name: Semantic Release
324279
env:
325280
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
326-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
327281
run: |
328-
git config --global user.name "github-actions[bot]"
329-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
330-
echo "=== Semantic Release Debug ==="
331-
semantic-release --noop publish || echo "semantic-release noop exited non-zero; continuing"
332-
echo "=== Actual Release ==="
282+
pip install python-semantic-release
333283
semantic-release publish
334284
335285
- name: Download build artifacts for release (Fallback)

0 commit comments

Comments
 (0)