From 795fffe42b301630778583fd50da356cd61a7b18 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:47:33 -0700 Subject: [PATCH 01/11] Combine publishing stages in release publisher --- azure-pipelines.release-publish.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 2f3aac21446cc..1096a91608273 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -47,11 +47,11 @@ extends: os: windows stages: - - stage: Stage_1 + - stage: Publish displayName: Publish tarball jobs: - - job: Job_1 - displayName: Agent job + - job: npm + displayName: Publish tarball condition: succeeded() timeoutInMinutes: 0 templateContext: @@ -83,12 +83,8 @@ extends: customEndpoint: Typescript NPM publishEndpoint: Typescript NPM - - stage: Stage_2 - displayName: Publish git tag - dependsOn: Stage_1 - jobs: - - job: Job_1 - displayName: Agent job + - job: github + displayName: Publish git tag condition: succeeded() timeoutInMinutes: 0 templateContext: From ddbd30843848639cb11f76bf49c8c40ea1da346f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:48:28 -0700 Subject: [PATCH 02/11] tweak --- azure-pipelines.release-publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 1096a91608273..634d30b76bea0 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -50,7 +50,7 @@ extends: - stage: Publish displayName: Publish tarball jobs: - - job: npm + - job: tarball displayName: Publish tarball condition: succeeded() timeoutInMinutes: 0 @@ -84,7 +84,8 @@ extends: publishEndpoint: Typescript NPM - job: github - displayName: Publish git tag + displayName: Create github release + dependsOn: tarball condition: succeeded() timeoutInMinutes: 0 templateContext: From ac1d4b976658c1805f02876e9bfeb7ae230a2691 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:48:52 -0700 Subject: [PATCH 03/11] Name --- azure-pipelines.release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 634d30b76bea0..d8d6ff3c5b0ca 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -48,7 +48,7 @@ extends: stages: - stage: Publish - displayName: Publish tarball + displayName: Publish jobs: - job: tarball displayName: Publish tarball From 9f05dc4b1df9e45aacd38eb958432f647328156d Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:13:20 -0700 Subject: [PATCH 04/11] Always create release if pushing to latest npm tag --- azure-pipelines.release-publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index d8d6ff3c5b0ca..818d2defd2da1 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -109,12 +109,14 @@ extends: title: TypeScript $(RELEASE_TITLE_NAME) releaseNotesSource: inline releaseNotesInline: | + assets: $(Pipeline.Workspace)/tgz/**/typescript-*.tgz - isDraft: true + isDraft: $[ not(eq(variables['PUBLISH_TAG'], 'latest')) ] addChangeLog: false From bf119772220e70469088b8230b598fc3a41aa716 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:23:12 -0700 Subject: [PATCH 05/11] Frendlier parameters --- azure-pipelines.release-publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 818d2defd2da1..2c5944b7d46bd 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -3,12 +3,22 @@ pr: none parameters: - name: _REMINDER - default: Review & undraft the release at https://github.com/microsoft/TypeScript/releases once it appears! + displayName: Review & undraft the release at https://github.com/microsoft/TypeScript/releases once it appears! + type: boolean + default: false - name: PUBLISH_TAG + displayName: npm publish tag default: dev + values: + - dev + - beta + - rc + - latest - name: RELEASE_TITLE_NAME + displayName: GitHub release title name default: 0.0.0 Test - name: TAG_NAME + displayName: Git tag name default: v0.0.0-SetMe variables: From fea489c47074d4df1286e874a47e7d22aeec78c3 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:23:58 -0700 Subject: [PATCH 06/11] Make it true for fun --- azure-pipelines.release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 2c5944b7d46bd..478ef6aa8eb4f 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -5,7 +5,7 @@ parameters: - name: _REMINDER displayName: Review & undraft the release at https://github.com/microsoft/TypeScript/releases once it appears! type: boolean - default: false + default: true - name: PUBLISH_TAG displayName: npm publish tag default: dev From 02baf04a4f9ac98ec87bdf0d6a60c77cb1ab90a7 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:28:07 -0700 Subject: [PATCH 07/11] one more dash --- azure-pipelines.release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 478ef6aa8eb4f..b7757c69acf99 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -119,7 +119,7 @@ extends: title: TypeScript $(RELEASE_TITLE_NAME) releaseNotesSource: inline releaseNotesInline: | - assets: $(Pipeline.Workspace)/tgz/**/typescript-*.tgz - isDraft: $[ not(eq(variables['PUBLISH_TAG'], 'latest')) ] + isDraft: ${{ eq(parameters.PUBLISH_TAG, 'latest') }} addChangeLog: false From e749a33ba82443d335e522574ba790b5913a4d71 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:48:06 -0700 Subject: [PATCH 09/11] Copy, don't move --- azure-pipelines.release-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 664dcb759691b..dc697882b65a1 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -76,12 +76,12 @@ extends: steps: - checkout: none - task: CmdLine@2 - displayName: Rename versioned drop to typescript.tgz + displayName: Copy versioned drop to typescript.tgz inputs: script: | pushd $(Pipeline.Workspace)/tgz ls -lhR - mv typescript-*.tgz typescript.tgz + cp typescript-*.tgz typescript.tgz - task: Npm@1 displayName: npm publish tarball inputs: @@ -89,7 +89,7 @@ extends: workingDir: $(Pipeline.Workspace)/tgz verbose: false customCommand: publish $(Pipeline.Workspace)/tgz/typescript.tgz --tag $(PUBLISH_TAG) - # This must match the service connection. + # This must match the service connection name. customEndpoint: Typescript NPM publishEndpoint: Typescript NPM @@ -111,7 +111,7 @@ extends: - task: GitHubRelease@1 displayName: GitHub release (create) inputs: - # This must match the service connection. + # This must match the service connection name. gitHubConnection: typescript-bot connection repositoryName: microsoft/TypeScript tagSource: userSpecifiedTag From 15262a9c5769e6c4bdbd1d98e9c467be310211ce Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:53:50 -0700 Subject: [PATCH 10/11] Drop _REMINDER var --- azure-pipelines.release-publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index dc697882b65a1..17d3410a57596 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -22,8 +22,6 @@ parameters: default: v0.0.0-SetMe variables: - - name: _REMINDER - value: ${{ parameters._REMINDER }} - name: PUBLISH_TAG value: ${{ parameters.PUBLISH_TAG }} - name: RELEASE_TITLE_NAME From ee72c16535a3049e399f1b9e2ecea94a86734f84 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 21 Apr 2025 14:11:47 -0700 Subject: [PATCH 11/11] Flip condition --- azure-pipelines.release-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.release-publish.yml b/azure-pipelines.release-publish.yml index 17d3410a57596..7c58d3f82ae6b 100644 --- a/azure-pipelines.release-publish.yml +++ b/azure-pipelines.release-publish.yml @@ -126,5 +126,5 @@ extends: * [npm](https://www.npmjs.com/package/typescript) --> assets: $(Pipeline.Workspace)/tgz/**/typescript-*.tgz - isDraft: ${{ eq(parameters.PUBLISH_TAG, 'latest') }} + isDraft: ${{ not(eq(parameters.PUBLISH_TAG, 'latest')) }} addChangeLog: false