2018-07-26 17:00:53 +03:00
|
|
|
trigger:
|
2019-06-12 12:27:03 +03:00
|
|
|
- master
|
|
|
|
- 1.* # VSTS only supports wildcards at the end
|
|
|
|
- electron-*
|
2020-07-10 07:14:12 +03:00
|
|
|
pr: none # no PR triggers
|
2018-07-26 17:00:53 +03:00
|
|
|
|
2018-08-31 22:13:57 +03:00
|
|
|
jobs:
|
2019-06-12 12:27:03 +03:00
|
|
|
- job: GetReleaseVersion
|
2020-07-03 08:04:46 +03:00
|
|
|
pool:
|
2020-07-26 01:32:18 +03:00
|
|
|
vmImage: 'ubuntu-latest'
|
2019-06-12 12:27:03 +03:00
|
|
|
steps:
|
|
|
|
# This has to be done separately because VSTS inexplicably
|
2020-07-26 20:13:06 +03:00
|
|
|
# exits the script block after `npm ci` completes.
|
2019-06-12 12:27:03 +03:00
|
|
|
- script: |
|
2020-07-26 01:24:40 +03:00
|
|
|
cd script/vsts
|
2020-07-26 20:13:06 +03:00
|
|
|
npm ci
|
|
|
|
displayName: npm ci
|
2020-07-26 01:24:40 +03:00
|
|
|
- script: node script/vsts/get-release-version.js
|
2019-06-12 12:27:03 +03:00
|
|
|
name: Version
|
2018-07-26 17:00:53 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
# Import OS-specific build definitions.
|
|
|
|
- template: platforms/windows.yml
|
|
|
|
- template: platforms/macos.yml
|
|
|
|
- template: platforms/linux.yml
|
2018-07-26 17:31:34 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
- job: UploadArtifacts
|
|
|
|
pool:
|
2020-07-26 01:35:34 +03:00
|
|
|
vmImage: 'ubuntu-latest'
|
2018-08-02 03:35:58 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
dependsOn:
|
|
|
|
- GetReleaseVersion
|
2020-08-04 19:12:09 +03:00
|
|
|
- Windows_RendererTests
|
2019-06-12 12:27:03 +03:00
|
|
|
- Linux
|
|
|
|
- macOS_tests
|
2018-08-31 22:50:00 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
variables:
|
|
|
|
ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
|
|
|
|
IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
|
|
|
|
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
|
2018-08-02 03:35:58 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
steps:
|
|
|
|
# This has to be done separately because VSTS inexplicably
|
2020-07-26 20:13:06 +03:00
|
|
|
# exits the script block after `npm ci` completes.
|
2019-06-12 12:27:03 +03:00
|
|
|
- script: |
|
2020-07-26 01:24:40 +03:00
|
|
|
cd script/vsts
|
2020-07-26 20:13:06 +03:00
|
|
|
npm ci
|
2019-06-12 12:27:03 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
2020-07-26 20:13:06 +03:00
|
|
|
displayName: npm ci
|
2018-08-02 03:35:58 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
inputs:
|
|
|
|
itemPattern: '**'
|
|
|
|
downloadType: 'specific'
|
|
|
|
displayName: Download Release Artifacts
|
2018-08-02 03:35:58 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
- script: |
|
2020-07-26 01:24:40 +03:00
|
|
|
node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom-staging"
|
2019-06-12 12:27:03 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
|
|
|
ATOM_RELEASE_VERSION: $(ReleaseVersion)
|
|
|
|
ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
|
|
|
|
ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
|
|
|
|
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
|
|
|
|
PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY)
|
|
|
|
displayName: Create Draft Release
|
|
|
|
condition: and(succeeded(), eq(variables['Atom.AutoDraftRelease'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
|
2018-08-02 03:35:58 +03:00
|
|
|
|
2019-06-12 12:27:03 +03:00
|
|
|
- script: |
|
2020-07-26 01:24:40 +03:00
|
|
|
node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --assets-path "$(System.ArtifactsDirectory)" --s3-path "vsts-artifacts/$(Build.BuildId)/"
|
2019-06-12 12:27:03 +03:00
|
|
|
env:
|
|
|
|
ATOM_RELEASE_VERSION: $(ReleaseVersion)
|
|
|
|
ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
|
|
|
|
ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
|
|
|
|
ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
|
|
|
|
displayName: Upload CI Artifacts to S3
|
|
|
|
condition: and(succeeded(), eq(variables['IsSignedZipBranch'], 'true'))
|