name: $(Date:yyyyMMdd)$(Rev:.r)

trigger: none
pr: none

resources:
  repositories:
    - repository: templates
      type: github
      name: microsoft/vscode-engineering
      ref: main
      endpoint: Monaco

parameters:
  - name: publishPackage
    displayName: 🚀 Publish tas-client-umd
    type: boolean
    default: false

extends:
  template: azure-pipelines/npm-package/pipeline.yml@templates
  parameters:
    npmPackages:
      - name: tas-client-umd

        buildSteps:
          - script: npm ci
            workingDirectory: $(Build.SourcesDirectory)/tas-client-umd
            displayName: Install dependencies
          - pwsh: Copy-Item -Recurse -Path ./node_modules/tas-client/ -Destination ./lib/ -Filter *.d.ts
            workingDirectory: $(Build.SourcesDirectory)/tas-client-umd
            displayName: Grab typings from non-UMD package

        publishPackage: ${{ parameters.publishPackage }}
        workingDirectory: $(Build.SourcesDirectory)/tas-client-umd