From 09a79f90a16a4e73de8aee93c699ddf5a3a30f02 Mon Sep 17 00:00:00 2001 From: Hassan Sufi Date: Mon, 4 Nov 2024 16:17:11 -0500 Subject: [PATCH 1/4] Remove commented-out separate sign step --- .azure/azure-pipelines-release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.azure/azure-pipelines-release.yml b/.azure/azure-pipelines-release.yml index 19f5aad..14e787a 100644 --- a/.azure/azure-pipelines-release.yml +++ b/.azure/azure-pipelines-release.yml @@ -40,11 +40,6 @@ extends: nodeVersion: ${{ parameters.nodeVersion }} signType: 'real' - # - template: stages/sign.yml - # parameters: - # signType: 'real' - # nodeVersion: ${{ parameters.nodeVersion }} - # Stage provides a manual approval step before the publish stage is run - template: stages/approval.yml From b5af1f9f936cb79fb11989f96139c5329e1469fb Mon Sep 17 00:00:00 2001 From: Hassan Sufi Date: Mon, 4 Nov 2024 22:56:13 -0500 Subject: [PATCH 2/4] Install Node in publish step --- .azure/azure-pipelines-prerelease.yml | 51 --------------------------- .azure/azure-pipelines-release.yml | 1 + .azure/stages/publish.yml | 7 ++++ 3 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 .azure/azure-pipelines-prerelease.yml diff --git a/.azure/azure-pipelines-prerelease.yml b/.azure/azure-pipelines-prerelease.yml deleted file mode 100644 index 4871d70..0000000 --- a/.azure/azure-pipelines-prerelease.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: vscode-makecode PreRelease - -# Currently only run this pipeline on request -trigger: none -pr: none - -pool: - vmImage: 'ubuntu-latest' - -variables: -- group: 'makecode-marketplace-pat' - -stages: - # Stage to build the VSIX and publish it -- stage: Build - displayName: Build the VSIX - jobs: - - job: Build - steps: - - template: templates/build.yml - parameters: - isPreRelease: true - - # Stage provides a manual approval step before the publish stage is run -- stage: Approval - displayName: Approve the release - jobs: - - deployment: ApproveRelease - displayName: "Approve Release" - environment: "makecode" # Defined in AzDO Pipeline environments - strategy: - runOnce: - deploy: - steps: - - checkout: none - - # Publish the VSIX to the extension marketplace -- stage: Publish - displayName: Publish the VSIX - dependsOn: - - Build - - Approval - jobs: - - job: Publish - variables: - - name: vsixName - value: $[ stageDependencies.Build.Build.outputs['SetExtensionName.VSIX'] ] - steps: - - template: templates/publish.yml - parameters: - isPreRelease: true diff --git a/.azure/azure-pipelines-release.yml b/.azure/azure-pipelines-release.yml index 14e787a..b0ef74a 100644 --- a/.azure/azure-pipelines-release.yml +++ b/.azure/azure-pipelines-release.yml @@ -47,3 +47,4 @@ extends: - template: stages/publish.yml parameters: isPreRelease: ${{ parameters.isPreRelease }} + nodeVersion: ${{ parameters.nodeVersion }} diff --git a/.azure/stages/publish.yml b/.azure/stages/publish.yml index ce8f7c4..f7e1014 100644 --- a/.azure/stages/publish.yml +++ b/.azure/stages/publish.yml @@ -1,6 +1,8 @@ parameters: - name: isPreRelease type: boolean + - name: nodeVersion + type: string stages: - stage: Publish @@ -14,6 +16,11 @@ stages: - name: vsixName value: $[ stageDependencies.Build.Build.outputs['SetExtensionName.VSIX'] ] steps: + - task: NodeTool@0 + displayName: 🔨 Install Node.js + inputs: + versionSpec: ${{ parameters.nodeVersion }} + - download: current artifact: extension displayName: 🚚 Download extension artifact From 96f8a70f7bfcb4af64f3ca732046f7f887b1e2a4 Mon Sep 17 00:00:00 2001 From: Hassan Sufi Date: Mon, 4 Nov 2024 22:57:29 -0500 Subject: [PATCH 3/4] Copy artifacts into current working directory --- .azure/stages/publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.azure/stages/publish.yml b/.azure/stages/publish.yml index f7e1014..7993930 100644 --- a/.azure/stages/publish.yml +++ b/.azure/stages/publish.yml @@ -33,10 +33,15 @@ stages: artifact: extension-signature displayName: 🚚 Download extension signature artifact + # Copy everything into the same folder before we run the publish. For some reason this is needed for the publish command. + - script: | + cp $(Pipeline.Workspace)/extension/$(SetExtensionName.VSIX) . + cp $(Pipeline.Workspace)/extension-manifest/$(SetExtensionName.VSIX).manifest . + cp $(Pipeline.Workspace)/extension-signature/$(SetExtensionName.VSIX).signature.p7s . - ${{ if parameters.isPreRelease }}: - bash: echo "Publishing PreRelease" - - script: npx @vscode/vsce@latest publish --packagePath $(Pipeline.Workspace)/extension/$(vsixName) --manifestPath $(Pipeline.Workspace)/extension-manifest/$(vsixName).manifest --signaturePath $(Pipeline.Workspace)/extension-signature/$(vsixName).signature.p7s --pre-release + - script: npx @vscode/vsce@latest publish --packagePath $(vsixName) --manifestPath $(vsixName).manifest --signaturePath $(vsixName).signature.p7s --pre-release displayName: Publish pre-release extension env: # Marketplace PAT needs to be uploaded as a pipeline variable @@ -44,7 +49,7 @@ stages: - ${{ else }}: - bash: echo "Publishing Release" - - script: npx @vscode/vsce@latest publish --packagePath $(Pipeline.Workspace)/extension/$(vsixName) --manifestPath $(Pipeline.Workspace)/extension-manifest/$(vsixName).manifest --signaturePath $(Pipeline.Workspace)/extension-signature/$(vsixName).signature.p7s + - script: npx @vscode/vsce@latest publish --packagePath $(vsixName) --manifestPath $(vsixName).manifest --signaturePath $(vsixName).signature.p7s displayName: Publish extension env: VSCE_PAT: $(marketplace-pat) From 05b31ec544775d1f2482973457d65b6be0e227d8 Mon Sep 17 00:00:00 2001 From: Hassan Sufi Date: Wed, 6 Nov 2024 11:56:37 -0500 Subject: [PATCH 4/4] Use correct variable name --- .azure/stages/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure/stages/publish.yml b/.azure/stages/publish.yml index 7993930..0991692 100644 --- a/.azure/stages/publish.yml +++ b/.azure/stages/publish.yml @@ -35,9 +35,9 @@ stages: # Copy everything into the same folder before we run the publish. For some reason this is needed for the publish command. - script: | - cp $(Pipeline.Workspace)/extension/$(SetExtensionName.VSIX) . - cp $(Pipeline.Workspace)/extension-manifest/$(SetExtensionName.VSIX).manifest . - cp $(Pipeline.Workspace)/extension-signature/$(SetExtensionName.VSIX).signature.p7s . + cp $(Pipeline.Workspace)/extension/$(vsixName) . + cp $(Pipeline.Workspace)/extension-manifest/$(vsixName).manifest . + cp $(Pipeline.Workspace)/extension-signature/$(vsixName).signature.p7s . - ${{ if parameters.isPreRelease }}: - bash: echo "Publishing PreRelease"