steps:
  - task: NodeTool@0
    inputs:
      versionSpec: "14.x"

  - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
    inputs:
      versionSpec: "1.x"

  - task: AzureKeyVault@1
    displayName: "Azure Key Vault: Get Secrets"
    inputs:
      azureSubscription: "vscode-builds-subscription"
      KeyVaultName: vscode
      SecretsFilter: 'builds-docdb-key-readwrite'

  - script: |
      set -e

      (cd build ; yarn)

      AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
      node build/azure-pipelines/common/releaseBuild.js
