-
Notifications
You must be signed in to change notification settings - Fork 44
/
azure-pipelines.yml
79 lines (69 loc) · 1.97 KB
/
azure-pipelines.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
68
69
70
71
72
73
74
75
76
77
78
79
# triggered by schedule
trigger: none
pr: none
schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- main
always: true
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishExtension
displayName: 🚀 Publish Extension
type: boolean
default: false
- name: VERSION_SUFFIX
displayName: Suffix appended to package version.
type: string
default: ' '
extends:
template: azure-pipelines/extension/pre-release.yml@templates
parameters:
usePreReleaseChannel: false
useContinuousReleaseSignal: false
l10nShouldProcess: false
buildSteps:
- checkout: self
clean: true
persistCredentials: true
- bash: |
npm install
chmod +x ./build/updateGrammar.sh
./build/updateGrammar.sh
grammarResult=$?
if [ $grammarResult -ne 0 ] ; then
echo "Unexpected error while updating grammar"
exit $grammarResult
fi
npm run bump-version ${{ parameters.VERSION_SUFFIX }}
result=$?
set -e
if [ $result -eq 0 ]; then
git config --local user.name "Azure Pipelines"
git config --local user.email "azuredevops@microsoft.com"
git add .
git commit -m "Publishing version bump ***NO_CI***"
git push origin HEAD:main
exit
elif [ $result -eq 1 ]; then
echo "Skipping publish"
exit 1
else
echo "Unexpected error"
exit $result
fi
displayName: 'Update TypeScript and grammar'
tsa:
config:
areaPath: 'Visual Studio Code Language Extensions'
serviceTreeID: 'c4cd3983-4977-4bcd-931f-a9822d2e950c'
enabled: true
publishExtension: ${{ parameters.publishExtension }}