name: Release-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr)

variables:
  # Don't download unneeded packages
  - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
    value: 'true'
  # Improve performance by not sending telemetry
  - name: DOTNET_CLI_TELEMETRY_OPTOUT
    value: 'true'

trigger:
  branches:
    include:
      - release

resources:
  repositories:
  - repository: ComplianceRepo
    type: github
    endpoint: GitHub
    name: PowerShell/compliance
  - repository: vscode-powershell
    type: git
    name: vscode-powershell

stages:
- stage: Build
  displayName: Build the release
  jobs:
  - job: Build
    pool:
      vmImage: windows-2019
    steps:
    - template: templates/ci-general.yml

- stage: Sign
  displayName: Sign the release
  jobs:
  - job: Sign
    pool:
      name: 1ES
      demands: ImageOverride -equals MMSWindows2019-Secure
    variables:
    - group: ESRP
    steps:
    - template: templates/release-general.yml

- stage: Publish
  displayName: Publish the draft release
  jobs:
  - deployment: Publish
    environment: PowerShellEditorServices
    pool:
      vmImage: ubuntu-latest
    variables:
    - group: Publish
    strategy:
      runOnce:
        deploy:
          steps:
          - template: templates/publish-general.yml

name: Release-$(Build.SourceBranchName)-$(Date:yyyyMMdd)$(Rev:.rr)

variables:
  # Don't download unneeded packages
  - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
    value: 'true'
  # Improve performance by not sending telemetry
  - name: DOTNET_CLI_TELEMETRY_OPTOUT
    value: 'true'

trigger:
  branches:
    include:
      - release

resources:
  repositories:
  - repository: ComplianceRepo
    type: github
    endpoint: GitHub
    name: PowerShell/compliance
  - repository: vscode-powershell
    type: git
    name: vscode-powershell

stages:
- stage: Build
  displayName: Build the release
  jobs:
  - job: Build
    pool:
      name: 1ES
      demands: ImageOverride -equals PSMMS2019-Secure
    steps:
    - template: templates/ci-general.yml

- stage: Sign
  displayName: Sign the release
  jobs:
  - job: Sign
    pool:
      name: 1ES
      demands: ImageOverride -equals PSMMS2019-Secure
    variables:
    - group: ESRP
    steps:
    - template: templates/release-general.yml

- stage: Publish
  displayName: Publish the draft release
  jobs:
  - deployment: Publish
    environment: PowerShellEditorServices
    pool:
      name: 1ES
      demands: ImageOverride -equals PSMMSUbuntu20.04-Secure
    variables:
    - group: Publish
    strategy:
      runOnce:
        deploy:
          steps:
          - template: templates/publish-general.yml

Update to new secure build and sign image
Update to new secure build and sign image
