ci: add cross-platform release workflow with version injection

Build linux/darwin amd64 and arm64 artifacts on push, upload GitHub
Release assets on v* tags, and expose version via agent-notify version.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 12:50:26 +08:00
parent 021fc3a828
commit 56a189e678
6 changed files with 165 additions and 2 deletions
+3
View File
@@ -39,6 +39,8 @@ func run(cmd string, args []string) error {
return cmdDoctor()
case "logs":
return cmdLogs(args)
case "version", "-V":
return cmdVersion()
case "help", "-h", "--help":
printUsage()
return nil
@@ -200,6 +202,7 @@ Commands:
test cursor [--try-all]
test claude [--apply]
logs [--tail 30]
version
doctor
`)
}
+16
View File
@@ -0,0 +1,16 @@
package main
import "fmt"
var (
version = "dev"
commit = "none"
buildDate = "unknown"
)
func cmdVersion() error {
fmt.Printf("agent-notify %s\n", version)
fmt.Printf("commit: %s\n", commit)
fmt.Printf("built: %s\n", buildDate)
return nil
}