-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazdevops_build_npm_react_frontend.yml
39 lines (32 loc) · 1.1 KB
/
azdevops_build_npm_react_frontend.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
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.14.2'
displayName: 'Instalando o Node.js 16.14.2...'
- script: |
npm i && npm run build
displayName: 'Executando o build...'
- task: CopyFiles@2
displayName: 'Copiando os arquivos compilados (/build) para o diretório de compactação...'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/build/'
Contents: '**'
TargetFolder: '$(Build.BinariesDirectory)'
- task: ArchiveFiles@2
displayName: 'Compactando os arquivos gerados durante o build...'
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/b'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.DefinitionName)-$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: 'Publicando os artefatos de build...'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(Build.DefinitionName)-$(Build.BuildId).zip'
ArtifactName: '$(Build.DefinitionName)-$(Build.BuildId).zip'
publishLocation: 'Container'