2018-05-22 17:50:44 +00:00
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
steps:
|
|
|
|
- bash: |
|
2018-09-17 18:53:18 +00:00
|
|
|
echo 'Non release VSTS builds do not run on older branches'
|
|
|
|
displayName: Skip build on older branch
|
|
|
|
condition: ne(variables['ELECTRON_RELEASE'], '1')
|
2018-05-22 17:50:44 +00:00
|
|
|
|
|
|
|
- bash: |
|
2018-09-17 18:53:18 +00:00
|
|
|
echo 'Bootstrapping Electron for release build'
|
|
|
|
script/bootstrap.py --target_arch=$TARGET_ARCH
|
|
|
|
name: Bootstrap
|
|
|
|
condition: eq(variables['ELECTRON_RELEASE'], '1')
|
2018-05-22 17:50:44 +00:00
|
|
|
|
|
|
|
- bash: |
|
2018-09-17 18:53:18 +00:00
|
|
|
echo 'Building Electron for release'
|
|
|
|
script/build.py -c R
|
2018-05-22 17:50:44 +00:00
|
|
|
name: Build
|
2018-09-17 18:53:18 +00:00
|
|
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
2018-05-22 17:50:44 +00:00
|
|
|
|
|
|
|
- bash: |
|
|
|
|
echo 'Creating Electron release distribution'
|
|
|
|
script/create-dist.py
|
|
|
|
name: Create_distribution
|
|
|
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
|
|
|
|
|
|
|
- bash: |
|
2018-06-13 20:11:26 +00:00
|
|
|
if [ "$UPLOAD_TO_S3" != "1" ]; then
|
2018-05-22 17:50:44 +00:00
|
|
|
echo 'Uploading Electron release distribution to github releases'
|
|
|
|
ELECTRON_S3_BUCKET="$(s3_bucket)" ELECTRON_S3_ACCESS_KEY="$(s3_access_key)" ELECTRON_S3_SECRET_KEY="$(s3_secret_key)" ELECTRON_GITHUB_TOKEN="$(github_token)" script/upload.py
|
|
|
|
else
|
|
|
|
echo 'Uploading Electron release distribution to s3'
|
|
|
|
ELECTRON_S3_BUCKET="$(s3_bucket)" ELECTRON_S3_ACCESS_KEY="$(s3_access_key)" ELECTRON_S3_SECRET_KEY="$(s3_secret_key)" ELECTRON_GITHUB_TOKEN="$(github_token)" script/upload.py --upload_to_s3
|
|
|
|
fi
|
|
|
|
name: Upload_distribution
|
|
|
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
|
|
|
|
2018-07-17 15:57:59 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Publish Build Artifacts
|
2018-06-14 15:12:35 +00:00
|
|
|
inputs:
|
2018-07-17 15:57:59 +00:00
|
|
|
PathtoPublish: '$(Build.SourcesDirectory)/out'
|
|
|
|
ArtifactName: out
|
2018-09-17 18:53:18 +00:00
|
|
|
condition: and(succeeded(), eq(variables['ELECTRON_RELEASE'], '1'))
|
2018-06-14 15:12:35 +00:00
|
|
|
|
2018-05-22 17:50:44 +00:00
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|