mirror of
https://github.com/atom/atom.git
synced 2026-01-26 23:38:48 -05:00
94 lines
3.2 KiB
YAML
94 lines
3.2 KiB
YAML
phases:
|
|
- phase: Windows
|
|
dependsOn: GetReleaseVersion
|
|
variables:
|
|
ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
|
|
IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
|
|
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
|
|
queue:
|
|
name: Hosted
|
|
timeoutInMinutes: 180
|
|
parallel: 2
|
|
matrix:
|
|
x64:
|
|
buildArch: x64
|
|
# TODO: x86 is currently not supported on VSTS
|
|
# x86:
|
|
# buildArch: x86
|
|
|
|
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: 8.9.3
|
|
displayName: Install Node.js 8.9.3
|
|
|
|
- script: |
|
|
ECHO Installing npm-windows-upgrade
|
|
npm install --global --production npm-windows-upgrade
|
|
ECHO Upgrading npm
|
|
npm-windows-upgrade --no-spinner --no-prompt --npm-version 6.2.0
|
|
|
|
- script: |
|
|
IF NOT EXIST C:\tmp MKDIR C:\tmp
|
|
SET SQUIRREL_TEMP=C:\tmp
|
|
IF [%IS_RELEASE_BRANCH%]==[true] (
|
|
ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
|
|
script\build.cmd --code-sign --compress-artifacts --create-windows-installer
|
|
) ELSE (
|
|
IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
|
|
ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
|
|
script\build.cmd --code-sign --compress-artifacts
|
|
) ELSE (
|
|
ECHO Pull request build, no code signing will be performed
|
|
script\build.cmd --compress-artifacts
|
|
)
|
|
)
|
|
env:
|
|
ATOM_RELEASE_VERSION: $(ReleaseVersion)
|
|
ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL: $(ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL)
|
|
ATOM_WIN_CODE_SIGNING_CERT_PASSWORD: $(ATOM_WIN_CODE_SIGNING_CERT_PASSWORD)
|
|
IS_RELEASE_BRANCH: $(IsReleaseBranch)
|
|
IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch)
|
|
displayName: Build Atom
|
|
|
|
- script: script\lint.cmd
|
|
displayName: Run linter
|
|
|
|
- script: script\test.cmd
|
|
env:
|
|
CI: true
|
|
CI_PROVIDER: VSTS
|
|
displayName: Run tests
|
|
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-windows.zip
|
|
ArtifactName: atom-x64-windows.zip
|
|
ArtifactType: Container
|
|
displayName: Upload atom-x64-windows.zip
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: $(Build.SourcesDirectory)/out/AtomSetup-x64.exe
|
|
ArtifactName: AtomSetup-x64.exe
|
|
ArtifactType: Container
|
|
displayName: Upload AtomSetup-x64.exe
|
|
condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'))
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-$(ReleaseVersion)-full.nupkg
|
|
ArtifactName: atom-x64-$(ReleaseVersion)-full.nupkg
|
|
ArtifactType: Container
|
|
displayName: Upload atom-x64-$(ReleaseVersion)-full.nupkg
|
|
condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'))
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
PathtoPublish: $(Build.SourcesDirectory)/out/RELEASES-x64
|
|
ArtifactName: RELEASES-x64
|
|
ArtifactType: Container
|
|
displayName: Upload RELEASES-x64
|
|
condition: and(succeeded(), eq(variables['IsReleaseBranch'], 'true'))
|