Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/module-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
- auth
- cache
- chimux
- configwatcher
- database
- eventbus
- eventlogger
- httpclient
- httpserver
- jsonschema
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
echo "Latest core tag: $LATEST_TAG"
HAS_CHANGES=false
if [ -z "$LATEST_TAG" ]; then
FILE=$(find . -maxdepth 1 -type f \( -name '*.go' -o -name 'go.mod' -o -name 'go.sum' \) | head -1 || true)
FILE=$(find . -maxdepth 1 -type f \( -name '*.go' -o -name 'go.mod' \) | head -1 || true)
if [ -n "$FILE" ]; then HAS_CHANGES=true; fi
else
CHANGED=$(git diff --name-only ${LATEST_TAG}..HEAD | grep -v '^modules/' || true)
Expand All @@ -53,8 +53,10 @@ jobs:
[[ $f == *.md ]] && continue
[[ $f == .github/* ]] && continue
[[ $f == examples/* ]] && continue
# Accept .go plus root go.mod/go.sum (allow optional leading ./)
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == go.sum ]] || [[ $f == ./go.mod ]] || [[ $f == ./go.sum ]]; then
# Accept .go plus root go.mod (NOT go.sum — it's a lockfile that
# changes whenever auto-bump runs go mod tidy and should not
# trigger a new core release by itself).
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == ./go.mod ]]; then
RELEVANT+="$f "
Comment on lines +56 to 60
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core change detection here intentionally ignores go.sum, but .github/workflows/release.yml still considers go.sum a core-changing file (both for initial release and diff-based detection). This inconsistency means release-all can skip a core release in cases where release.yml would release (e.g., checksum-only updates after go mod tidy). Recommend keeping the detection rules consistent between the two workflows (either include go.sum here again, or also remove it from release.yml if that behavior is truly desired).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed — aligned release.yml to also exclude go.sum from core detection, matching the same logic in release-all.yml. Both workflows now consistently treat go.sum as a lockfile that shouldn't trigger releases. Fixed in 5ccb423.

fi
done <<< "$CHANGED"
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ jobs:
echo "Latest core tag: ${LATEST_TAG:-<none>}"
CHANGED=false
if [ -z "$LATEST_TAG" ]; then
# No prior release; treat as changed if any go files or go.mod/go.sum exist (initial release scenario)
if git ls-files '*.go' 'go.mod' 'go.sum' | grep -v '^modules/' | head -n1 >/dev/null 2>&1; then CHANGED=true; fi
# No prior release; treat as changed if any go files or go.mod exist (initial release scenario).
# go.sum is excluded — it's a lockfile that changes on every go mod tidy.
if git ls-files '*.go' 'go.mod' | grep -v '^modules/' | head -n1 >/dev/null 2>&1; then CHANGED=true; fi
else
DIFF=$(git diff --name-only ${LATEST_TAG}..HEAD | grep -v '^modules/' || true)
RELEVANT=""
Expand All @@ -74,7 +75,10 @@ jobs:
[[ $f == *.md ]] && continue
[[ $f == .github/* ]] && continue
[[ $f == examples/* ]] && continue
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == go.sum ]] || [[ $f == ./go.mod ]] || [[ $f == ./go.sum ]]; then
# Accept .go plus root go.mod (NOT go.sum — it's a lockfile that
# changes whenever auto-bump runs go mod tidy and should not
# trigger a new core release by itself).
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == ./go.mod ]]; then
RELEVANT+="$f "
fi
done <<< "$DIFF"
Expand Down
Loading