aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/workflows/release.go
blob: f220c0f7174daa2d0ac95630353ba1809ebfc972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//go:build workflows

package main

var _ = (&Workflow{
	Name: "Release",
	On:   Map[any]{{"push", Map[[]string]{{"tags", []string{"v*"}}}}},

	Jobs: []KV[Job]{
		{"release", Job{
			Name: "Create release",
			On:   "rosa",

			Steps: []Step{
				fixup,

				{
					Name: "Checkout",
					Uses: "actions/checkout@v4",

					With: []KV[any]{
						{"fetch-depth", 0},
						{"fetch-tags", true},
					},
				},

				{
					Name: "Request distribution",
					ID:   "dist",
					Run: "/rosa/bin/mbf ci dist -o result " +
						". \"$(cat cmd/dist/VERSION)-act\" && " +
						"git tag " +
						"--list " +
						"--format='%(contents:body)' " +
						"\"$(cat cmd/dist/VERSION)\" >> " +
						"\"/tmp/release-body\"",
				},

				{
					Name: "Create release",
					Uses: "https://gitea.com/actions/gitea-release-action@v1.3.7",

					With: []KV[any]{
						{"files", "result/hakurei-**"},
						{"body_path", "/tmp/release-body"},
						{"draft", true},
					},
				},
			},
		}},
	},
}).mustWriteFile("release")