Path: blob/main/extensions/copilot/build/npm-package-next.yml
13383 views
trigger: none12pr: none34resources:5repositories:6- repository: templates7type: github8name: microsoft/vscode-engineering9ref: main10endpoint: Monaco11pipelines:12- pipeline: vscode13source: '⭐️ VS Code'14trigger:15stages:16- Release17branches:18include:19- main20- release/*2122parameters:23- name: NPM_REGISTRY24displayName: "Custom NPM Registry"25type: string26default: 'https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/'2728name: "$(Date:yyyyMMdd).$(Rev:r)"2930extends:31template: azure-pipelines/npm-package/pipeline.yml@templates32parameters:33npmPackages:34- name: vscode-copilot-chat35buildSteps:36- task: NodeTool@037inputs:38versionSpec: 22.x39displayName: �� Install Node.js (22.x)4041- template: extensions/copilot/build/steps/setup-npm.yml@self42parameters:43NPM_REGISTRY: ${{ parameters.NPM_REGISTRY }}4445- download: vscode46artifact: copilot_vsix47displayName: �� Download Copilot VSIX48condition: and(succeeded(), ne(variables['resources.pipeline.vscode.runName'], ''))4950- bash: |51set -e52if [ -f "$(Pipeline.Workspace)/vscode/copilot_vsix/copilot-chat.vsix" ]; then53unzip -o "$(Pipeline.Workspace)/vscode/copilot_vsix/copilot-chat.vsix" 'extension/package.json'54VERSION=$(node -p "require('./extension/package.json').version")55rm -rf extension56node -e "57const fs = require('fs');58const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));59pkg.version = '$VERSION';60fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');61"62echo "Set extension version to $VERSION"63else64echo "No Copilot VSIX found, using version from package.json"65fi66displayName: 📋 Sync version from extension67workingDirectory: extensions/copilot6869- bash: npm ci && npm run extract-chat-lib && rm -rf node_modules70displayName: �� Extract chat-lib71workingDirectory: extensions/copilot72env:73PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 17475- bash: |76set -e77VERSION=$(node -p "require('../package.json').version")78node -e "79const fs = require('fs');80const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));81pkg.version = '$VERSION';82fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');83"84echo "Set chat-lib version to $VERSION"85displayName: 📋 Sync chat-lib version86workingDirectory: extensions/copilot/chat-lib8788- script: npm ci89displayName: �� Install chat-lib dependencies90workingDirectory: extensions/copilot/chat-lib9192- script: npm run build93displayName: �� Build chat-lib94workingDirectory: extensions/copilot/chat-lib95testPlatforms:96- name: Linux97nodeVersions: [22.x]98- name: MacOS99nodeVersions: [22.x]100- name: Windows101nodeVersions: [22.x]102workingDirectory: extensions/copilot/chat-lib103testSteps:104- template: extensions/copilot/build/steps/test-chat-lib.yml@self105parameters:106NPM_REGISTRY: ${{ parameters.NPM_REGISTRY }}107# Triggered by ⭐️ VS Code pipeline → always publish to next108publishPackage: true109publishRequiresApproval: false110tag: next111ghCreateRelease: false112ghReleaseAddChangeLog: false113114115