forked from Ar3sDevelopment/tsparticles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
84 lines (73 loc) · 2.17 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
- staging
- dev
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
displayName: npm ci
inputs:
command: 'ci'
- task: Npm@1
displayName: npm run build
inputs:
command: 'custom'
customCommand: 'run build'
- task: npmAuthenticate@0
displayName: npm authenticate
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
workingFile: '.npmrc'
customEndpoint: 'npmjs'
- task: Npm@1
displayName: npm publish
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: 'publish'
publishEndpoint: 'npmjs'
- task: CopyFiles@2
displayName: Copying files to Artifacts
inputs:
Contents: |
dist/**
docs/**
TargetFolder: '$(Build.ArtifactStagingDirectory)'
CleanTargetFolder: true
OverWrite: true
- task: NuGetCommand@2
displayName: 'Nuget Pack'
inputs:
command: 'pack'
packagesToPack: '**/*.nuspec'
versioningScheme: 'off'
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: 'Nuget Publish'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'Nuget'
- task: PublishBuildArtifacts@1
displayName: Publishing Artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'tsparticles'
publishLocation: 'Container'
- task: GitHubRelease@1
displayName: 'Github Release'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
gitHubConnection: 'github.com_matteobruni'
repositoryName: 'matteobruni/tsparticles'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
assets: '$(Build.ArtifactStagingDirectory)/dist/*'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'