Skip to content

Commit

Permalink
[ci] attach archives with complete source code of the repo to releases (
Browse files Browse the repository at this point in the history
#4111)

* attach archives with complete source code of the repo to releases

* restore missed conditions
  • Loading branch information
StrikerRUS authored Mar 26, 2021
1 parent 65349b4 commit 5734f91
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,26 @@ jobs:
pool:
vmImage: 'ubuntu-latest'
steps:
# Create archives with complete source code included (with git submodules)
- task: ArchiveFiles@2
displayName: Create zip archive
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false
archiveType: zip
archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_zip.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
displayName: Create tar.gz archive
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false
archiveType: tar
tarCompression: gz
archiveFile: '$(Build.ArtifactStagingDirectory)/archives/LightGBM-complete_source_code_tar_gz.tar.gz'
replaceExistingArchive: true
# Download all agent packages from all previous phases
- task: DownloadBuildArtifacts@0
displayName: Download package assets
Expand All @@ -301,10 +321,10 @@ jobs:
inputs:
command: pack
packagesToPack: '$(Build.SourcesDirectory)/.nuget/*.nuspec'
packDestination: '$(Build.ArtifactStagingDirectory)'
packDestination: '$(Build.ArtifactStagingDirectory)/nuget'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
pathtoPublish: '$(Build.ArtifactStagingDirectory)/nuget'
artifactName: NuGet
artifactType: container
- task: GitHubRelease@0
Expand All @@ -319,7 +339,8 @@ jobs:
title: '$(Build.SourceBranchName)'
assets: |
$(Build.SourcesDirectory)/binaries/PackageAssets/*
$(Build.ArtifactStagingDirectory)/*.nupkg
$(Build.ArtifactStagingDirectory)/nuget/*.nupkg
$(Build.ArtifactStagingDirectory)/archives/*
assetUploadMode: 'delete'
isDraft: true
isPreRelease: false
Expand Down

0 comments on commit 5734f91

Please sign in to comment.