pulsar/script/vsts/release-branch-build.yml

78 lines
2.7 KiB
YAML
Raw Normal View History

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
jobs:
2019-06-12 12:27:03 +03:00
- job: GetReleaseVersion
2020-07-03 08:04:46 +03:00
pool:
vmImage: 'ubuntu-latest'
2019-06-12 12:27:03 +03:00
steps:
# This has to be done separately because VSTS inexplicably
# exits the script block after `npm ci` completes.
2019-06-12 12:27:03 +03:00
- script: |
cd script/vsts
npm ci
displayName: npm ci
- script: node script/vsts/get-release-version.js
2019-06-12 12:27:03 +03:00
name: Version
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
2019-06-12 12:27:03 +03:00
- job: UploadArtifacts
pool:
vmImage: 'ubuntu-latest'
2019-06-12 12:27:03 +03:00
dependsOn:
- GetReleaseVersion
- Windows_RendererTests
2019-06-12 12:27:03 +03:00
- Linux
- macOS_tests
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'] ]
2019-06-12 12:27:03 +03:00
steps:
# This has to be done separately because VSTS inexplicably
# exits the script block after `npm ci` completes.
2019-06-12 12:27:03 +03:00
- script: |
cd script/vsts
npm ci
2019-06-12 12:27:03 +03:00
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
displayName: npm ci
2019-06-12 12:27:03 +03:00
- task: DownloadBuildArtifacts@0
inputs:
itemPattern: '**'
downloadType: 'specific'
displayName: Download Release Artifacts
2019-06-12 12:27:03 +03:00
- script: |
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'))
2019-06-12 12:27:03 +03:00
- script: |
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'))