@@ -179,6 +179,8 @@ async function commitAndCreatePullRequest(moduleInfo) {
179179 `gh pr create --title "${ moduleInfo . nameWithSpace } : Updating changelogs" --body "This is an automated PR." --base main --head ${ changelogBranchName } `
180180 ) ;
181181 console . log ( "Created PR for changelog updates." ) ;
182+
183+ return changelogBranchName ;
182184}
183185
184186async function updateWidgetChangelogs ( widgetsFolders ) {
@@ -248,24 +250,18 @@ async function createMPK(tmpFolder, moduleInfo, excludeFilesRegExp) {
248250 return ( await getFiles ( tmpFolder , [ `.mpk` ] ) ) [ 0 ] ;
249251}
250252
251- async function createGithubRelease ( moduleInfo , moduleChangelogs , mpkOutput ) {
252- console . log ( `Creating Github release for module ${ moduleInfo . nameWithSpace } ` ) ;
253- await createGithubReleaseFrom ( {
254- title : `${ moduleInfo . nameWithSpace } ${ moduleInfo . version } - Mendix ${ moduleInfo . minimumMXVersion } ` ,
255- body : moduleChangelogs ,
256- tag : process . env . TAG ,
257- mpkOutput
258- } ) ;
259- }
253+ async function createGithubReleaseFrom ( params ) {
254+ const { body, title, tag, filesToRelease = "" , target, isDraft = false , repo } = params ;
260255
261- async function createGithubReleaseFrom ( { title, body, tag, mpkOutput, isDraft = false } ) {
262256 const command = [
263257 `gh release create` ,
264258 `--title '${ title } '` ,
265259 `--notes '${ body } '` ,
266260 isDraft ? "--draft" : "" ,
261+ repo ? `-R '${ repo } '` : "" ,
267262 `'${ tag } '` ,
268- `'${ mpkOutput } '`
263+ `--target '${ target } '` ,
264+ filesToRelease ? `'${ filesToRelease } '` : ""
269265 ]
270266 . filter ( str => str !== "" )
271267 . join ( " " ) ;
@@ -340,7 +336,6 @@ module.exports = {
340336 updateChangelogs,
341337 cloneRepo,
342338 createMPK,
343- createGithubRelease,
344339 createGithubReleaseFrom,
345340 writeToWidgetChangelogs,
346341 zip,
0 commit comments