-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
129 lines (115 loc) · 3.46 KB
/
Taskfile.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: '3'
vars:
ARTIFACT: harp
tasks:
default:
cmds:
- task: release
release:
desc: Generate a release
cmds:
- task: release-clean
- task: release-all
- task: release-checksum
- task: release-formula
release-clean:
cmds:
- rm -rf dist && mkdir dist
release-all:
deps:
- release-darwin-amd64
- release-darwin-arm64
- release-linux-amd64
- release-linux-arm64
- release-linux-arm7
- release-windows-amd64
- release-windows-arm64
release-darwin-amd64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-darwin-amd64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-darwin-amd64"
sources:
- bin/{{.ARTIFACT}}-darwin-amd64
generates:
- dist/{{.ARTIFACT}}-darwin-amd64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-darwin-amd64
method: checksum
release-darwin-arm64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-darwin-arm64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-darwin-arm64"
sources:
- bin/{{.ARTIFACT}}-darwin-arm64
generates:
- dist/{{.ARTIFACT}}-darwin-arm64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-darwin-amd64
method: checksum
release-linux-amd64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-linux-amd64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-linux-amd64"
sources:
- bin/{{.ARTIFACT}}-linux-amd64
generates:
- dist/{{.ARTIFACT}}-linux-amd64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-linux-amd64
method: checksum
release-linux-arm64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-linux-arm64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-linux-arm64"
sources:
- bin/{{.ARTIFACT}}-linux-arm64
generates:
- dist/{{.ARTIFACT}}-linux-arm64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-linux-arm64
method: checksum
release-linux-arm7:
cmds:
- "tar czf dist/{{.ARTIFACT}}-linux-arm7-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-linux-arm7"
sources:
- bin/{{.ARTIFACT}}-linux-arm7
generates:
- dist/{{.ARTIFACT}}-linux-arm7-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-linux-arm7
method: checksum
release-windows-amd64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-windows-amd64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-windows-amd64.exe"
sources:
- bin/{{.ARTIFACT}}-windows-amd64.exe
generates:
- dist/{{.ARTIFACT}}-windows-amd64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-windows-amd64.exe
method: checksum
release-windows-arm64:
cmds:
- "tar czf dist/{{.ARTIFACT}}-windows-arm64-$RELEASE.tar.gz -C bin {{.ARTIFACT}}-windows-arm64.exe"
sources:
- bin/{{.ARTIFACT}}-windows-arm64.exe
generates:
- dist/{{.ARTIFACT}}-windows-arm64-$RELEASE.tar.gz
preconditions:
- test -f bin/{{.ARTIFACT}}-windows-arm64.exe
method: checksum
release-checksum:
deps:
- release-all
cmds:
- cd dist && sha512sum {{.ARTIFACT}}-*.tar.gz > {{.ARTIFACT}}-checksum.txt
- cd dist && gpg --detach-sign --armor {{.ARTIFACT}}-checksum.txt
- cat dist/{{.ARTIFACT}}-checksum.txt
generates:
- dist/{{.ARTIFACT}}-checksum.txt
- dist/{{.ARTIFACT}}-checksum.txt.asc
release-formula:
deps:
- release-darwin-amd64
- release-darwin-arm64
- release-linux-amd64
cmds:
- mage homebrew > dist/{{.ARTIFACT}}.rb
generates:
- dist/{{.ARTIFACT}}.rb