@@ -145,7 +145,7 @@ function commitRelease(apiServer: string, apiVersion: string, appSlug: string, u
145145 return defer . promise ;
146146}
147147
148- function publishRelease ( apiServer : string , releaseUrl : string , releaseNotes : string , destinationId : string , token : string , userAgent : string ) {
148+ function publishRelease ( apiServer : string , releaseUrl : string , isMandatory : boolean , releaseNotes : string , destinationId : string , token : string , userAgent : string ) {
149149 tl . debug ( "-- Mark package available." ) ;
150150 let defer = Q . defer < void > ( ) ;
151151 let publishReleaseUrl : string = `${ apiServer } /${ releaseUrl } ` ;
@@ -160,6 +160,7 @@ function publishRelease(apiServer: string, releaseUrl: string, releaseNotes: str
160160 let publishBody = {
161161 "status" : "available" ,
162162 "release_notes" : releaseNotes ,
163+ "mandatory_update" : isMandatory ,
163164 "destinations" : [
164165 {
165166 "id" : destinationId
@@ -426,6 +427,8 @@ async function run() {
426427 releaseNotes = tl . getInput ( 'releaseNotesInput' , true ) ;
427428 }
428429
430+ let isMandatory : boolean = tl . getBoolInput ( 'isMandatory' , false ) ;
431+
429432 let destinationId = tl . getInput ( 'destinationId' , false ) || '00000000-0000-0000-0000-000000000000' ;
430433 tl . debug ( `Effective destinationId: ${ destinationId } ` ) ;
431434
@@ -459,7 +462,7 @@ async function run() {
459462 let packageUrl = await commitRelease ( effectiveApiServer , effectiveApiVersion , appSlug , uploadInfo . upload_id , apiToken , userAgent ) ;
460463
461464 // Publish
462- await publishRelease ( effectiveApiServer , packageUrl , releaseNotes , destinationId , apiToken , userAgent ) ;
465+ await publishRelease ( effectiveApiServer , packageUrl , isMandatory , releaseNotes , destinationId , apiToken , userAgent ) ;
463466
464467 if ( symbolsFile ) {
465468 // Begin preparing upload symbols
0 commit comments