2019-06-24 20:23:23 +08:00
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
|
2019-06-24 20:33:59 +08:00
|
|
|
variables:
|
|
|
|
- group: Vars
|
|
|
|
|
2019-06-27 12:44:58 +08:00
|
|
|
jobs:
|
2019-06-27 12:42:54 +08:00
|
|
|
- job: Windows
|
|
|
|
pool:
|
2019-06-28 18:30:55 +08:00
|
|
|
vmImage: 'vs2017-win2016'
|
2019-06-27 12:42:54 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
|
2019-06-28 18:38:57 +08:00
|
|
|
- script: yarn --network-timeout 100000
|
2019-06-27 12:42:54 +08:00
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- script: node scripts/build-native.js
|
|
|
|
displayName: 'Rebuild native dependencies'
|
|
|
|
|
|
|
|
- script: yarn run build
|
|
|
|
displayName: 'Build'
|
|
|
|
|
|
|
|
- script: node scripts/prepackage-plugins.js
|
|
|
|
displayName: 'Prepackage plugins'
|
|
|
|
|
|
|
|
- script: node scripts/build-windows.js
|
|
|
|
displayName: 'Package'
|
|
|
|
env:
|
|
|
|
WIN_CSC_LINK: $(WIN_CSC_LINK)
|
|
|
|
WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
|
|
|
|
BT_TOKEN: $(BT_TOKEN)
|
|
|
|
GH_TOKEN: $(GH_TOKEN)
|
2019-06-28 16:23:47 +08:00
|
|
|
DEBUG: electron-builder
|
2019-06-27 12:42:54 +08:00
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
contents: 'dist\\*-setup.exe'
|
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Windows - Installer
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
contents: 'dist\\*-portable.exe'
|
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Windows - Portable build
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- job: Linux
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
|
|
|
|
- script: yarn
|
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- script: node scripts/build-native.js
|
|
|
|
displayName: 'Rebuild native dependencies'
|
|
|
|
|
|
|
|
- script: yarn run build
|
|
|
|
displayName: 'Build'
|
|
|
|
|
|
|
|
- script: node scripts/prepackage-plugins.js
|
|
|
|
displayName: 'Prepackage plugins'
|
|
|
|
|
|
|
|
- script: node scripts/build-linux.js
|
|
|
|
displayName: 'Package'
|
|
|
|
env:
|
|
|
|
BT_TOKEN: $(BT_TOKEN)
|
|
|
|
GH_TOKEN: $(GH_TOKEN)
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.deb'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Linux - DEB
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.rpm'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Linux - RPM
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.snap'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Linux - Snap
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.tar.gz'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: Linux - tar.gz
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- job: macOS
|
|
|
|
pool:
|
2019-06-28 18:30:55 +08:00
|
|
|
vmImage: 'macOS-10.14'
|
2019-06-27 12:42:54 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
|
|
|
|
- script: yarn
|
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- script: node scripts/build-native.js
|
|
|
|
displayName: 'Rebuild native dependencies'
|
|
|
|
|
|
|
|
- script: yarn run build
|
|
|
|
displayName: 'Build'
|
|
|
|
|
|
|
|
- script: node scripts/prepackage-plugins.js
|
|
|
|
displayName: 'Prepackage plugins'
|
|
|
|
|
|
|
|
- script: node scripts/build-macos.js
|
|
|
|
displayName: 'Package'
|
|
|
|
env:
|
2019-06-28 19:02:52 +08:00
|
|
|
_CSC_LINK: $(CSC_LINK)
|
|
|
|
_CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD)
|
2019-06-27 12:42:54 +08:00
|
|
|
BT_TOKEN: $(BT_TOKEN)
|
|
|
|
GH_TOKEN: $(GH_TOKEN)
|
2019-06-27 16:54:18 +08:00
|
|
|
APPSTORE_USERNAME: $(APPSTORE_USERNAME)
|
|
|
|
APPSTORE_PASSWORD: $(APPSTORE_PASSWORD)
|
2019-06-28 16:23:47 +08:00
|
|
|
DEBUG: electron-builder
|
2019-06-27 12:42:54 +08:00
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.dmg'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: macOS - DMG
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
2019-06-27 12:53:57 +08:00
|
|
|
contents: 'dist/*.zip'
|
2019-06-27 12:42:54 +08:00
|
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
flattenFolders: true
|
|
|
|
cleanTargetFolder: true
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: macOS - app.zip
|
|
|
|
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
|