-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathazure-pipelines.pr.yml
67 lines (55 loc) · 2.6 KB
/
azure-pipelines.pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# PR Validation build.
name: "$(Year:yyyy).$(Month).0.$(BuildID)-pr"
# Notes: Only trigger a PR build for main and release, and skip build/rebuild
# on changes in the news and .vscode folders.
pr:
autoCancel: true
branches:
include: ["main", "release/*"]
paths:
exclude: ["/.vscode"]
# Not the CI build for merges to main and release.
trigger: none
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
extends:
template: azure-pipelines/extension/pre-release.yml@templates
parameters:
customNPMRegistry:
buildSteps:
# Instructions can be found here under `npm` (https://dev.azure.com/msresearch/MSR%20Engineering/_packaging?_a=connect&feed=MSR-Python-Analysis)
# Generate token with read/write for Packaging from the msresearch org.
- task: Bash@3
displayName: Update .npmrc file
inputs:
targetType: "inline"
script: |
echo '@msrvida:registry=https://pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/registry/.' > .npmrc
echo 'always-auth=true' >> .npmrc
echo '' >> .npmrc
echo '; begin auth token' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/registry/:username=msresearch' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/registry/:_password=$(NPM_TOKEN_BASE64_FOR_GATHER)' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/registry/:email=npm requires email to be set but doesnt use the value' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/:username=msresearch' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/:_password=$(NPM_TOKEN_BASE64_FOR_GATHER)' >> .npmrc
echo '//pkgs.dev.azure.com/msresearch/_packaging/MSR-Python-Analysis/npm/:email=npm requires email to be set but doesnt use the value' >> .npmrc
echo '; end auth token' >> .npmrc
echo '' >> .npmrc
- bash: npm i -g [email protected]
displayName: Install [email protected]
- script: npm ci
displayName: Install dependencies
- script: npm i -g @vscode/vsce
displayName: Install @vscode/vsce
- script: npm run build
displayName: Build
- script: vsce package -o vscode-gather.vsix
displayName: Package
- publish: $(System.DefaultWorkingDirectory)/vscode-gather.vsix
artifact: vscode-gather.vsix