From 698c97751171b971eff6fb3f082d0b6e763632f0 Mon Sep 17 00:00:00 2001 From: Andriy Oblivantsev Date: Thu, 19 Feb 2026 20:54:42 +0000 Subject: [PATCH] Skip release for docs-only changes Semantic release now checks changed files and skips tag/publish when only docs, README, STATUS, AGENTS, or .gitignore are modified. Co-authored-by: Cursor --- .github/workflows/release.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d69915..43e05b9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,7 +51,24 @@ jobs: git clone https://git.produktor.io/${{ gitea.repository }}.git . git fetch --tags + - name: Check if release-worthy changes + id: changes + run: | + CHANGED=$(git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only HEAD) + echo "Changed files:" + echo "$CHANGED" + # Skip release if only docs, markdown, or non-chart files changed + RELEASE_FILES=$(echo "$CHANGED" | grep -vE '^(docs/|README\.md|STATUS\.md|AGENTS\.md|TASKS\.md|\.gitignore|djinni-)' || true) + if [ -z "$RELEASE_FILES" ]; then + echo "Only docs/meta files changed — skipping release." + echo "skip=true" >> "$GITHUB_OUTPUT" + else + echo "Chart/workflow files changed — proceeding with release." + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + - name: Determine version bump + if: steps.changes.outputs.skip != 'true' id: version run: | LATEST_TAG=$(git tag -l 'v*' --sort=-v:refname | head -1) @@ -99,16 +116,19 @@ jobs: echo "bump_type=${BUMP}" >> "$GITHUB_OUTPUT" - name: Install Helm + if: steps.changes.outputs.skip != 'true' run: | curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - name: Update Chart.yaml version + if: steps.changes.outputs.skip != 'true' run: | sed -i "s/^version: .*/version: ${{ steps.version.outputs.new_version }}/" fleetdm-stack/Chart.yaml echo "Chart.yaml version set to ${{ steps.version.outputs.new_version }}" grep '^version:' fleetdm-stack/Chart.yaml - name: Package chart + if: steps.changes.outputs.skip != 'true' run: | helm dependency update fleetdm-stack/ helm package fleetdm-stack/ @@ -117,6 +137,7 @@ jobs: ls -la .tmp/ - name: Create tag + if: steps.changes.outputs.skip != 'true' run: | git config user.name "Gitea Actions" git config user.email "actions@git.produktor.io" @@ -124,6 +145,7 @@ jobs: git push https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git "${{ steps.version.outputs.new_tag }}" - name: Create Gitea Release + if: steps.changes.outputs.skip != 'true' run: | TAG="${{ steps.version.outputs.new_tag }}" BUMP="${{ steps.version.outputs.bump_type }}"