forked from angelobreuer/Lavalink4NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
50 lines (48 loc) · 1.57 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
variables:
- name: BUILD_VERSION
value: 1.6.3
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DotNetCoreCLI@2
displayName: Build projects
inputs:
command: 'build'
projects: 'src/**/*.csproj'
arguments: '--configuration Release /property:Version=$(BUILD_VERSION)'
- task: DotNetCoreCLI@2
displayName: Run tests
inputs:
command: 'test'
projects: 'src/Lavalink4NET.Tests/Lavalink4NET.Tests.csproj'
arguments: '--configuration Release --no-build'
- task: DotNetCoreCLI@2
displayName: NuGet packaging
inputs:
command: 'pack'
packagesToPack: 'src/**/*.csproj'
configuration: 'Release'
nobuild: true
includesymbols: true
versioningScheme: 'byEnvVar'
versionEnvVar: 'BUILD_VERSION'
verbosityPack: 'Minimal'
- task: NuGetCommand@2
displayName: Push to Azure feed
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '59efcb96-30b1-4853-8b73-4906861ebe5f/aa5e7181-834a-45e2-8438-3b3147abca2b'
allowPackageConflicts: true
verbosityPush: 'Normal'
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Push to NuGet feed'
inputs:
arguments: '--skip-duplicate'
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet Lavalink4NET'
verbosityPush: 'Normal'