SpeedyLoader/azure-pipelines.yml

103 lines
2.7 KiB
YAML
Raw Permalink Normal View History

2019-02-17 01:54:54 -08:00
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
2019-02-17 17:24:38 -08:00
- azure-pipelines
2019-02-17 01:54:54 -08:00
2019-02-20 14:14:15 -08:00
2019-02-17 17:24:38 -08:00
jobs:
2019-02-20 13:53:40 -08:00
2019-02-20 14:34:25 -08:00
- job: generic_build
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
2019-02-20 18:27:50 -08:00
outputExtension: '*.AppImage'
2019-02-20 14:34:25 -08:00
builderOptions: '--linux'
buildName: "Linux AppImage"
artefactName: "Linux AppImage"
2019-02-20 14:34:25 -08:00
mac:
imageName: 'macos-10.13'
outputExtension: '*.dmg'
builderOptions: '--mac'
buildName: "Mac"
artefactName: "Mac 64-bit"
2019-02-20 14:34:25 -08:00
windows-64:
imageName: 'vs2017-win2016'
outputExtension: '*.exe'
builderOptions: '--win'
buildName: "Windows 64-bit"
artefactName: "Windows 64-bit"
2019-02-17 01:54:54 -08:00
2019-02-17 17:24:38 -08:00
pool:
2019-02-20 14:14:15 -08:00
vmImage: $(imageName)
2019-02-17 17:24:38 -08:00
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
2019-02-17 17:52:08 -08:00
- bash: |
2019-02-17 18:11:05 -08:00
npm cache clean --force
rm -rf node_modules/
2019-02-20 13:53:40 -08:00
npm install
npm install electron-builder -g
2019-02-20 15:08:01 -08:00
electron-builder --publish=never $(builderOptions)
2019-02-20 14:34:25 -08:00
displayName: $(buildName)
2019-02-20 13:53:40 -08:00
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/dist'
2019-02-20 14:34:25 -08:00
contents: $(outputExtension)
2019-02-20 13:53:40 -08:00
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
2019-02-20 14:34:25 -08:00
artifactName: $(artefactName)
2019-07-02 00:36:40 -07:00
#- task: GithubRelease@0
# displayName: 'Create GitHub Release'
# inputs:
# githubConnection: speeduino
# repositoryName: speeduino/SpeedyLoader
# action: 'create'
# target: '$(build.sourceVersion)'
# assets: $(Build.ArtifactStagingDirectory)/*.zip
# addChangeLog: true
# isDraft: true
2019-02-20 13:53:40 -08:00
2019-02-20 14:49:18 -08:00
- job: job_win_32_bit_self_hosted
pool: 'Default'
2019-02-20 15:08:01 -08:00
timeoutInMinutes: 5
2019-02-20 14:49:18 -08:00
steps:
- task: NodeTool@0
enabled: false
2019-02-20 14:49:18 -08:00
inputs:
2019-02-20 14:52:20 -08:00
versionSpec: '8.x'
2019-02-20 14:49:18 -08:00
displayName: 'Install Node.js'
- script: |
2019-02-20 14:49:18 -08:00
npm install
npm install electron-builder -g
electron-builder --win
2019-02-20 14:49:18 -08:00
displayName: 'Windows 32-bit'
- task: CopyFiles@2
inputs:
2019-02-20 14:52:20 -08:00
sourceFolder: '$(Build.SourcesDirectory)\dist'
contents: '*.exe'
targetFolder: $(Build.ArtifactStagingDirectory)
2019-02-20 14:49:18 -08:00
- task: PublishBuildArtifacts@1
inputs:
2019-02-20 14:52:20 -08:00
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: "Windows 32-bit"
2019-07-02 00:36:40 -07:00
#- task: GithubRelease@0
# displayName: 'Create GitHub Release'
# inputs:
# githubConnection: speeduino
# repositoryName: speeduino/SpeedyLoader
# action: 'create'
# target: '$(build.sourceVersion)'
# assets: $(Build.ArtifactStagingDirectory)/*.zip
# addChangeLog: true
# isDraft: true