Browse Source

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 <hdieterichs@microsoft.com>
Ladislau Szomoru 2 years ago
parent
commit
b4737b60ed
2 changed files with 28 additions and 0 deletions
  1. 14 0
      .azure-pipelines/publish-nightly.yml
  2. 14 0
      .azure-pipelines/publish-stable.yml

+ 14 - 0
.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)

+ 14 - 0
.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)