From dddf7ff347004a9bd42da2865e9e81c9a00b9d6b Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 19 Jun 2026 01:11:20 +0000 Subject: [PATCH] fix(ci): restore internal/ui/dist/.gitkeep after UI rebuild in release.yml GoReleaser aborts with 'git is in a dirty state' when the release tag commits internal/ui/dist/.gitkeep (as scripts/release.sh does via `touch`): release.yml rebuilds the UI, vite's emptyOutDir deletes the committed .gitkeep, and the resulting 'D internal/ui/dist/.gitkeep' fails GoReleaser's clean-tree check. Restore the placeholder after the rebuild so the tree matches the tag. No-op for tags that don't track .gitkeep (e.g. v0.3.1). Unblocks the v0.4.0-beta.1 signed-artifact build via workflow_dispatch recovery. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01LDQVJrixs2nJoea67a8pEG --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 756a7f2..102dcb4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,6 +83,11 @@ jobs: npm ci npm run build test -f ../internal/ui/dist/index.html + # vite's emptyOutDir wipes internal/ui/dist on rebuild, deleting the + # committed .gitkeep placeholder that script-cut release tags carry. + # Restore it so the working tree matches the tag and GoReleaser's + # dirty-state check passes (no-op for tags that don't track .gitkeep). + git -C "$GITHUB_WORKSPACE" checkout -- internal/ui/dist/.gitkeep 2>/dev/null || true - name: Install cosign # sigstore/cosign-installer v3.9.2 — provides `cosign` for the keyless