From d2afde1c95355621282d1ac1a9ae73c3b665b395 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 28 Sep 2026 17:37:30 +0900 Subject: internal/workflows: migrate workflows This represents workflow documents via compound literals and removes the ugly and footgun-heavy yaml documents. Signed-off-by: Ophestra --- internal/workflows/release.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 internal/workflows/release.go (limited to 'internal/workflows/release.go') 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") -- cgit v1.3.1