forked from microsoft/vscode-typescript-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
47 lines (40 loc) · 1.15 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
# triggered by schedule
schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- master
always: true
pr: none
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadSecureFile@1
inputs:
secureFile: vscode_typescript_next_deploy_key
displayName: 'Get the deploy key'
- bash: |
chmod +x ./build/bumpAndPublish.sh
./build/bumpAndPublish.sh '$(marketplace_key)'
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***"
mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
git remote set-url --push origin git@github.com:microsoft/vscode-typescript-next.git
git push origin HEAD:master
exit
elif [ $result -eq 1 ]; then
echo "Skipping publish"
exit
else
echo "Unexpected error"
exit $result
fi
displayName: 'Publish to marketplace'