fix(release): keep git tree clean for goreleaser

The dist copy deleted tracked .keep and overwrote tracked index.html —
dirty tree aborted the release. index.html is now untracked (bare clones
serve 404 instead of a stale stub), .keep alone satisfies go:embed, and
the workflow merges into dist/ without rm. fetch-depth: 0 for tag history.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-21 20:06:46 +02:00
1 parent 2c07d04972
commit 46b40047f2
3 files changed
+5 -23

No files matched your search

+5 -1
View File
@@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # goreleaser needs full history for tag + changelog
- uses: actions/setup-node@v4
with:
@@ -22,7 +24,9 @@ jobs:
- run: npm run build
# go:embed all:dist reads internal/web/dist at compile time.
- run: rm -rf apps/backend/internal/web/dist && cp -r apps/frontend/dist apps/backend/internal/web/dist
# Merge into dist/ — don't rm -rf: the tracked .keep must survive or
# goreleaser aborts on the dirty tree.
- run: cp -r apps/frontend/dist/. apps/backend/internal/web/dist/
- uses: actions/setup-go@v5
with:
-1
View File
@@ -5,7 +5,6 @@ packages/api-client/dist/
packages/api-client/src/schema.d.ts
apps/backend/internal/web/dist/*
!apps/backend/internal/web/dist/.keep
!apps/backend/internal/web/dist/index.html
# data / runtime
data/*
-21
View File
@@ -1,21 +0,0 @@
<!doctype html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dash</title>
<script>
// Pre-paint theme: localStorage mirrors the server setting, applied
// before first paint so there is no flash of the wrong theme.
try {
var t = localStorage.getItem("dash.theme");
document.documentElement.dataset.theme = t === "light" ? "light" : "dark";
} catch (e) {}
</script>
<script type="module" crossorigin src="/assets/index-WK6y87Wv.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CHTjdWqd.css">
</head>
<body>
<div id="root"></div>
</body>
</html>