File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed
Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ description: Publish releases from local builds instead of GitHub Actions
3+ alwaysApply: true
4+ ---
5+
6+ # Manual Local Release
7+
8+ - Do not rely on GitHub Actions tag workflows to publish releases for this repository.
9+ - Preferred release flow: push code and tag first, build release archives locally, then upload artifacts directly.
10+ - Build release packages from the target tag in a clean checkout or temporary worktree with `make package`.
11+ - Always build the web UI before packaging so release binaries embed `internal/server/static` instead of falling back to a missing local `web/dist`.
12+ - Publish GitHub releases manually with `gh release create` or `gh release upload` after local packaging.
13+ - Publish GitLab release assets manually or via `scripts/push.sh` with `--skip-build` after local packaging is complete.
14+ - Keep release notes concise: use 1-3 bullets that describe the actual user-visible fixes or changes in this version.
15+ - Follow repository network rules during release work:
16+ - GitLab and other internal services: direct connection, no proxy
17+ - GitHub and other external services: `source ~/.myshrc` before upload commands
Original file line number Diff line number Diff line change @@ -15,19 +15,20 @@ build: build-web
1515
1616build-all : build-darwin-arm64 build-darwin-amd64 build-linux-amd64 build-linux-arm64 build-windows-amd64
1717
18- build-darwin-arm64 :
18+ # Cross-platform binaries must embed the built web UI too.
19+ build-darwin-arm64 : build-web
1920 GOOS=darwin GOARCH=arm64 go build $(LDFLAGS ) -o bin/$(BINARY_NAME ) -$(VERSION ) -darwin-arm64 ./cmd/csghub-lite
2021
21- build-darwin-amd64 :
22+ build-darwin-amd64 : build-web
2223 GOOS=darwin GOARCH=amd64 go build $(LDFLAGS ) -o bin/$(BINARY_NAME ) -$(VERSION ) -darwin-amd64 ./cmd/csghub-lite
2324
24- build-linux-amd64 :
25+ build-linux-amd64 : build-web
2526 GOOS=linux GOARCH=amd64 go build $(LDFLAGS ) -o bin/$(BINARY_NAME ) -$(VERSION ) -linux-amd64 ./cmd/csghub-lite
2627
27- build-linux-arm64 :
28+ build-linux-arm64 : build-web
2829 GOOS=linux GOARCH=arm64 go build $(LDFLAGS ) -o bin/$(BINARY_NAME ) -$(VERSION ) -linux-arm64 ./cmd/csghub-lite
2930
30- build-windows-amd64 :
31+ build-windows-amd64 : build-web
3132 GOOS=windows GOARCH=amd64 go build $(LDFLAGS ) -o bin/$(BINARY_NAME ) -$(VERSION ) -windows-amd64.exe ./cmd/csghub-lite
3233
3334clean-dist :
@@ -68,7 +69,7 @@ test-cover:
6869lint :
6970 golangci-lint run ./...
7071
71- release-snapshot :
72+ release-snapshot : build-web
7273 goreleaser release --snapshot --clean
7374
7475clean :
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ csghub-lite-linux-arm64 # Linux ARM64
3535csghub-lite-windows-amd64.exe # Windows
3636```
3737
38+ ` make build ` 、` make build-all ` 与 ` make package ` 都会先构建 ` web ` 并同步到 ` internal/server/static ` ,确保发布二进制内嵌 Web UI。
39+
3840### 版本号
3941
4042版本号通过 ` git tag ` 管理,自动嵌入二进制文件:
@@ -123,7 +125,7 @@ export GITLAB_TOKEN="glpat-..." # 或写入 local/secrets.env 后由 push.sh
123125./scripts/push.sh --skip-github --skip-build --skip-gitlab-git --tag v0.5.10
124126` ` `
125127
126- 本地从零构建再上传时,检出对应 tag 后执行 `make package`,然后 `scripts/push.sh --skip-github --skip-build --tag vX.Y.Z`(会包含向 GitLab 推送 tag,除非加 `--skip-gitlab-git`)。
128+ 本地从零构建再上传时,检出对应 tag 后执行 `make package`,确认产物已内嵌最新 Web UI,然后执行 `scripts/push.sh --skip-github --skip-build --tag vX.Y.Z`(会包含向 GitLab 推送 tag,除非加 `--skip-gitlab-git`)。
127129
128130# ## 本地测试发布
129131
You can’t perform that action at this time.
0 commit comments