forked from dotnet-script/dotnet-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
114 lines (90 loc) · 3.45 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
resources:
- repo: self
trigger:
tags:
include:
- refs/tags/*
branches:
include:
- '*'
variables:
- group: dotnet-script-api-keys
jobs:
- job: Job_3
displayName: Ubuntu Agent
condition: succeeded()
pool:
name: Hosted Ubuntu 1604
steps:
- bash: 'curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 3.0.100-preview-010184'
displayName: 'Install 3.0.100-preview-010184'
- bash: 'curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 2.1.402'
displayName: 'Install 2.1.402'
- bash: |
export PATH=/home/vsts/.dotnet:$PATH
curl -L https://github.com/filipw/dotnet-script/releases/download/0.28.0/dotnet-script.0.28.0.zip > dotnet-script.zip
unzip -o dotnet-script.zip -d ./
displayName: 'Install dotnet-script'
- bash: |
export PATH=/home/vsts/.dotnet:$PATH
dotnet dotnet-script/dotnet-script.dll build/Build.csx
displayName: 'Run build.csx'
- job: Job_1
displayName: Mac Agent
condition: succeeded()
pool:
name: Hosted macOS
steps:
- bash: |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -version 3.0.100-preview-010184
displayName: 'Install 3.0.100-preview-010184'
- bash: |
curl -L https://github.com/filipw/dotnet-script/releases/download/0.28.0/dotnet-script.0.28.0.zip > dotnet-script.zip
unzip -o dotnet-script.zip -d ./
displayName: 'Install dotnet-script'
- bash: 'dotnet dotnet-script/dotnet-script.dll build/build.csx'
displayName: 'Run build.csx'
- job: Job_2
displayName: Windows Agent
condition: succeeded()
pool:
name: Hosted Windows 2019 with VS2019
steps:
- powershell: |
iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1
.\dotnet-install.ps1 -Version 3.0.100-preview-010184
displayName: 'Install 3.0.100-preview-010184 SDK'
- powershell: |
iwr https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.ps1 -outfile dotnet-install.ps1
.\dotnet-install.ps1 -Version 2.1.402
displayName: 'Install 3.0.100-preview-010184 2.1.402 SDK'
# NuGet Tool Installer
# Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this task to change the version of NuGet used in the NuGet tasks.
- task: NuGetToolInstaller@0
inputs:
versionSpec: '4.8.2'
#checkLatest: false # Optional
- bash: |
export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH
dotnet --info
displayName: 'Show installed sdk'
- bash: |
export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH
cd build
curl -L https://github.com/filipw/dotnet-script/releases/download/0.28.0/dotnet-script.0.28.0.zip > dotnet-script.zip
unzip -o dotnet-script.zip -d ./
displayName: 'Install dotnet-script'
- bash: |
export PATH=/c/Users/VssAdministrator/AppData/Local/Microsoft/dotnet:$PATH
cd build
dotnet dotnet-script/dotnet-script.dll build.csx
displayName: 'Run build.csx'
env:
IS_SECURE_BUILDENVIRONMENT: $(IS_SECURE_BUILDENVIRONMENT)
GITHUB_REPO_TOKEN: $(GITHUB_REPO_TOKEN)
NUGET_APIKEY: $(NUGET_APIKEY)
CHOCOLATEY_APIKEY: $(CHOCOLATEY_APIKEY)
- task: PublishPipelineArtifact@0
displayName: 'Publish Pipeline Artifact'
inputs:
targetPath: build/Artifacts