@@ -74,7 +74,7 @@ func (h *DefinitionHolder) Definitions() map[string]*workflow.Definition {
74
74
}
75
75
76
76
// RegisterMailDLCLDefinition registers a workflow definition for mailing a golang.org/dl CL
77
- // onto h, using e for the external service configuration .
77
+ // onto h.
78
78
func RegisterMailDLCLDefinition (h * DefinitionHolder , tasks * task.VersionTasks ) {
79
79
versions := workflow.Parameter {
80
80
Name : "Versions" ,
@@ -101,6 +101,108 @@ For example:
101
101
h .RegisterDefinition ("mail-dl-cl" , wd )
102
102
}
103
103
104
+ // RegisterAnnounceDefinitions registers workflow definitions involving announcing
105
+ // onto h.
106
+ func RegisterAnnounceDefinitions (h * DefinitionHolder , tasks task.AnnounceMailTasks ) {
107
+ version := workflow.Parameter {
108
+ Name : "Version" ,
109
+ Doc : `Version is the Go version that has been released.
110
+
111
+ The version string must use the same format as Go tags.` ,
112
+ }
113
+ security := workflow.Parameter {
114
+ Name : "Security (optional)" ,
115
+ ParameterType : workflow .SliceLong ,
116
+ Doc : `Security is a list of descriptions, one for each distinct security fix included in this release, in Markdown format.
117
+
118
+ The empty list means there are no security fixes included.
119
+
120
+ This field applies only to minor releases.
121
+
122
+ Past examples:
123
+ • "encoding/pem: fix stack overflow in Decode
124
+
125
+ A large (more than 5 MB) PEM input can cause a stack overflow in Decode,
126
+ leading the program to crash.
127
+
128
+ Thanks to Juho Nurminen of Mattermost who reported the error.
129
+
130
+ This is CVE-2022-24675 and Go issue https://go.dev/issue/51853."
131
+ • "crypto/elliptic: tolerate all oversized scalars in generic P-256
132
+
133
+ A crafted scalar input longer than 32 bytes can cause P256().ScalarMult
134
+ or P256().ScalarBaseMult to panic. Indirect uses through crypto/ecdsa and
135
+ crypto/tls are unaffected. amd64, arm64, ppc64le, and s390x are unaffected.
136
+
137
+ This was discovered thanks to a Project Wycheproof test vector.
138
+
139
+ This is CVE-2022-28327 and Go issue https://go.dev/issue/52075."` ,
140
+ Example : `encoding/pem: fix stack overflow in Decode
141
+
142
+ A large (more than 5 MB) PEM input can cause a stack overflow in Decode,
143
+ leading the program to crash.
144
+
145
+ Thanks to Juho Nurminen of Mattermost who reported the error.
146
+
147
+ This is CVE-2022-24675 and Go issue https://go.dev/issue/51853.` ,
148
+ }
149
+ names := workflow.Parameter {
150
+ Name : "Names (optional)" ,
151
+ ParameterType : workflow .SliceShort ,
152
+ Doc : `Names is an optional list of release coordinator names to include in the sign-off message.` ,
153
+ }
154
+
155
+ {
156
+ minorVersion := version
157
+ minorVersion .Example = "go1.18.2"
158
+ secondaryVersion := workflow.Parameter {
159
+ Name : "SecondaryVersion" ,
160
+ Doc : `SecondaryVersion is an older Go version that was also released.` ,
161
+ Example : "go1.17.10" ,
162
+ }
163
+
164
+ wd := workflow .New ()
165
+ sentMail := wd .Task ("mail-announcement" , func (ctx * workflow.TaskContext , v1 , v2 string , sec , names []string ) (task.SentMail , error ) {
166
+ return tasks .AnnounceMinorRelease (ctx , task.ReleaseAnnouncement {Version : v1 , SecondaryVersion : v2 , Security : sec , Names : names })
167
+ }, wd .Parameter (minorVersion ), wd .Parameter (secondaryVersion ), wd .Parameter (security ), wd .Parameter (names ))
168
+ wd .Output ("AnnouncementURL" , wd .Task ("await-announcement" , tasks .AwaitAnnounceMail , sentMail ))
169
+ h .RegisterDefinition ("announce-minor" , wd )
170
+ }
171
+ {
172
+ betaVersion := version
173
+ betaVersion .Example = "go1.19beta1"
174
+
175
+ wd := workflow .New ()
176
+ sentMail := wd .Task ("mail-announcement" , func (ctx * workflow.TaskContext , v string , names []string ) (task.SentMail , error ) {
177
+ return tasks .AnnounceBetaRelease (ctx , task.ReleaseAnnouncement {Version : v , Names : names })
178
+ }, wd .Parameter (betaVersion ), wd .Parameter (names ))
179
+ wd .Output ("AnnouncementURL" , wd .Task ("await-announcement" , tasks .AwaitAnnounceMail , sentMail ))
180
+ h .RegisterDefinition ("announce-beta" , wd )
181
+ }
182
+ {
183
+ rcVersion := version
184
+ rcVersion .Example = "go1.19rc1"
185
+
186
+ wd := workflow .New ()
187
+ sentMail := wd .Task ("mail-announcement" , func (ctx * workflow.TaskContext , v string , names []string ) (task.SentMail , error ) {
188
+ return tasks .AnnounceRCRelease (ctx , task.ReleaseAnnouncement {Version : v , Names : names })
189
+ }, wd .Parameter (rcVersion ), wd .Parameter (names ))
190
+ wd .Output ("AnnouncementURL" , wd .Task ("await-announcement" , tasks .AwaitAnnounceMail , sentMail ))
191
+ h .RegisterDefinition ("announce-rc" , wd )
192
+ }
193
+ {
194
+ majorVersion := version
195
+ majorVersion .Example = "go1.19"
196
+
197
+ wd := workflow .New ()
198
+ sentMail := wd .Task ("mail-announcement" , func (ctx * workflow.TaskContext , v string , names []string ) (task.SentMail , error ) {
199
+ return tasks .AnnounceMajorRelease (ctx , task.ReleaseAnnouncement {Version : v , Names : names })
200
+ }, wd .Parameter (majorVersion ), wd .Parameter (names ))
201
+ wd .Output ("AnnouncementURL" , wd .Task ("await-announcement" , tasks .AwaitAnnounceMail , sentMail ))
202
+ h .RegisterDefinition ("announce-major" , wd )
203
+ }
204
+ }
205
+
104
206
// RegisterTweetDefinitions registers workflow definitions involving tweeting
105
207
// onto h, using e for the external service configuration.
106
208
func RegisterTweetDefinitions (h * DefinitionHolder , e task.ExternalConfig ) {
0 commit comments