aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/workflows/release.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-09-28 17:37:30 +0900
committerOphestra <cat@gensokyo.uk>2026-09-28 17:37:30 +0900
commitd2afde1c95355621282d1ac1a9ae73c3b665b395 (patch)
tree910f2dff6a1e86491840357bf150df5ad685a37e /internal/workflows/release.go
parentd621c53cc1ad96adb36612e6143691dd0c79362b (diff)
internal/workflows: migrate workflows
This represents workflow documents via compound literals and removes the ugly and footgun-heavy yaml documents. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/workflows/release.go')
-rw-r--r--internal/workflows/release.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/workflows/release.go b/internal/workflows/release.go
new file mode 100644
index 00000000..8b7f30bb
--- /dev/null
+++ b/internal/workflows/release.go
@@ -0,0 +1,37 @@
+//go:build workflows
+
+package main
+
+var _ = (&Workflow{
+ Name: "Release",
+ On: Map[any]{{K: "push", V: Map[string]{{K: "tags", V: "v*"}}}},
+
+ Jobs: []KV[Job]{
+ {K: "release", V: Job{
+ Name: "Create release",
+ On: "nix",
+
+ Steps: []Step{
+ {Name: "Checkout", Uses: "actions/checkout@v4"},
+
+ {
+ Name: "Build for release",
+ Run: "nix build " +
+ "--print-out-paths " +
+ "--print-build-logs " +
+ "./test#dist",
+ },
+
+ {
+ Name: "Release",
+ Uses: "https://gitea.com/actions/release-action@main",
+
+ With: []KV[any]{
+ {K: "files", V: "result/hakurei-**"},
+ {K: "api_key", V: "${{secrets.RELEASE_TOKEN}}"},
+ },
+ },
+ },
+ }},
+ },
+}).mustWriteFile("release")