From b4737b60ed67d69256e4f9252d0b1d074df49ca9 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:27:15 +0100 Subject: [PATCH] Engineering - Add tasks to create and push a tag with the version number (#3520) * Engineering - Add tasks to create and push a tag with the version number * Renames tag to follow v[VERSION] pattern --------- Co-authored-by: Henning Dieterichs --- .azure-pipelines/publish-nightly.yml | 14 ++++++++++++++ .azure-pipelines/publish-stable.yml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.azure-pipelines/publish-nightly.yml b/.azure-pipelines/publish-nightly.yml index 3630e375..4490bd9f 100644 --- a/.azure-pipelines/publish-nightly.yml +++ b/.azure-pipelines/publish-nightly.yml @@ -54,3 +54,17 @@ extends: tag: next publishPackage: true publishRequiresApproval: false + + postPublishSteps: + - checkout: self + persistCredentials: true + + - script: | + set -e + + git config user.email "vscode@microsoft.com" + git config user.name "VSCode" + + git tag -a v$(SetPackageSpec.PACKAGE_VERSION) -m v$(SetPackageSpec.PACKAGE_VERSION) + git push origin v$(SetPackageSpec.PACKAGE_VERSION) + workingDirectory: $(Build.SourcesDirectory) diff --git a/.azure-pipelines/publish-stable.yml b/.azure-pipelines/publish-stable.yml index 2190aa47..464ea459 100644 --- a/.azure-pipelines/publish-stable.yml +++ b/.azure-pipelines/publish-stable.yml @@ -56,3 +56,17 @@ extends: tag: latest publishPackage: ${{ parameters.publishMonacoEditor }} publishRequiresApproval: false + + postPublishSteps: + - checkout: self + persistCredentials: true + + - script: | + set -e + + git config user.email "vscode@microsoft.com" + git config user.name "VSCode" + + git tag -a v$(SetPackageSpec.PACKAGE_VERSION) -m v$(SetPackageSpec.PACKAGE_VERSION) + git push origin v$(SetPackageSpec.PACKAGE_VERSION) + workingDirectory: $(Build.SourcesDirectory)