@@ -11,20 +11,27 @@ strategy:
11
11
matrix :
12
12
Linux :
13
13
imageName : ' ubuntu-latest'
14
+ rid : ' linux-x64'
15
+ artifact : ' sayit-linux-x64'
14
16
Mac :
15
17
imageName : ' macos-latest'
18
+ rid : ' osx-x64'
19
+ artifact : ' sayit-osx-x64'
16
20
Windows :
17
21
imageName : ' vs2017-win2016'
22
+ rid : ' win-x64'
23
+ artifact : ' sayit-win-x64'
18
24
19
25
pool :
20
26
vmImage : $(imageName)
21
27
22
28
variables :
23
29
buildConfiguration : ' Release'
30
+ framework : netcoreapp3.0
24
31
25
32
steps :
26
33
- task : UseDotNet@2
27
- displayName : ' Install .NET Core SDK'
34
+ displayName : Install .NET Core SDK
28
35
inputs :
29
36
version : 3.0.100
30
37
@@ -33,10 +40,25 @@ steps:
33
40
inputs :
34
41
command : build
35
42
projects : ' **/*.fsproj'
36
- arguments : ' --configuration $(buildConfiguration)'
43
+ arguments : ' -c $(buildConfiguration)'
37
44
38
45
- task : DotNetCoreCLI@2
46
+ displayName : Run tests
39
47
inputs :
40
48
command : test
41
49
projects : ' **/*Tests/*.fsproj'
42
- arguments : ' --configuration $(buildConfiguration) --collect "Code coverage"'
50
+ arguments : ' -c $(buildConfiguration)'
51
+
52
+ - task : DotNetCoreCLI@2
53
+ displayName : Publish release
54
+ inputs :
55
+ command : publish
56
+ publishWebProjects : False
57
+ projects : ' SayIt/SayIt.fsproj'
58
+ arguments : ' -c $(BuildConfiguration) -f $(framework) /p:RuntimeIdentifier=$(rid) /p:PublishSingleFile=true /p:PublishReadyToRun=true /p:UseAppHost=true --output $(Build.ArtifactStagingDirectory)'
59
+
60
+ - task : PublishBuildArtifacts@1
61
+ displayName : Publish artifact
62
+ inputs :
63
+ pathtoPublish : ' $(Build.ArtifactStagingDirectory)'
64
+ artifactName : ' $(artifact)'
0 commit comments