-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
58 lines (47 loc) · 1.33 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
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
displayName: 'Install Node.js'
- script: |
npm install --force
displayName: 'npm install'
- task: Bash@3
inputs:
targetType: 'inline'
script: |
PUBLIC_URL="." npm run build
displayName: 'npm build react app'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/react-web.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/react-web.zip'
ArtifactName: 'react-drop'
publishLocation: 'Container'
# - script: |
# npm run dist
# displayName: 'package electron app'
# - task: CmdLine@2
# inputs:
# script: 'mkdir pipelineOutput'
# workingDirectory: '$(Pipeline.Workspace)'
# - task: CopyFiles@2
# inputs:
# SourceFolder: 'dist'
# Contents: '*Setup*.exe*'
# TargetFolder: '$(Pipeline.Workspace)/pipelineOutput'
# - task: PublishBuildArtifacts@1
# inputs:
# PathtoPublish: '$(Pipeline.Workspace)/pipelineOutput'
# ArtifactName: 'drop'
# publishLocation: 'Container'