release-branch-build.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. trigger:
  2. - master
  3. - 1.* # VSTS only supports wildcards at the end
  4. - electron-*
  5. pr: none # no PR triggers
  6. # workaround for https://bit.ly/2CK8itc
  7. variables:
  8. _ATOM_RELEASES_S3_KEY: $[ variables.ATOM_RELEASES_S3_KEY ]
  9. _ATOM_RELEASES_S3_SECRET: $[ variables.ATOM_RELEASES_S3_SECRET ]
  10. _ATOM_RELEASES_S3_BUCKET: $[ variables.ATOM_RELEASES_S3_BUCKET ]
  11. _PACKAGE_CLOUD_API_KEY: $[ variables.PACKAGE_CLOUD_API_KEY ]
  12. jobs:
  13. # GetReleaseVersion
  14. - template: platforms/templates/get-release-version.yml
  15. # Import lint definition
  16. - template: lint.yml
  17. # Import OS-specific build definitions.
  18. - template: platforms/windows.yml
  19. - template: platforms/macos.yml
  20. - template: platforms/linux.yml
  21. - job: UploadArtifacts
  22. pool:
  23. vmImage: 'ubuntu-latest'
  24. dependsOn:
  25. - GetReleaseVersion
  26. - Lint
  27. - Windows_tests
  28. - Linux
  29. - macOS_tests
  30. variables:
  31. ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
  32. IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
  33. IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
  34. steps:
  35. - template: platforms/templates/preparation.yml
  36. - task: DownloadBuildArtifacts@0
  37. inputs:
  38. itemPattern: '**'
  39. downloadType: 'specific'
  40. displayName: Download Release Artifacts
  41. - script: |
  42. node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --create-github-release --assets-path "$(System.ArtifactsDirectory)" --linux-repo-name "atom-staging"
  43. env:
  44. GITHUB_TOKEN: $(GITHUB_TOKEN)
  45. ATOM_RELEASE_VERSION: $(ReleaseVersion)
  46. ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
  47. ATOM_RELEASES_AZURE_CONN_STRING: $(ATOM_RELEASES_AZURE_CONN_STRING)
  48. ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
  49. ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
  50. PACKAGE_CLOUD_API_KEY: $(PACKAGE_CLOUD_API_KEY)
  51. displayName: Create Draft Release
  52. condition: and(succeeded(), eq(variables['Atom.AutoDraftRelease'], 'true'), eq(variables['IsReleaseBranch'], 'true'))
  53. - script: |
  54. node $(Build.SourcesDirectory)/script/vsts/upload-artifacts.js --assets-path "$(System.ArtifactsDirectory)" --azure-blob-path "vsts-artifacts/$(Build.BuildId)/"
  55. env:
  56. ATOM_RELEASE_VERSION: $(ReleaseVersion)
  57. ATOM_RELEASES_S3_KEY: $(ATOM_RELEASES_S3_KEY)
  58. ATOM_RELEASES_AZURE_CONN_STRING: $(ATOM_RELEASES_AZURE_CONN_STRING)
  59. ATOM_RELEASES_S3_SECRET: $(ATOM_RELEASES_S3_SECRET)
  60. ATOM_RELEASES_S3_BUCKET: $(ATOM_RELEASES_S3_BUCKET)
  61. displayName: Upload CI Artifacts to S3
  62. condition: and(succeeded(), eq(variables['IsSignedZipBranch'], 'true'))