File tree Expand file tree Collapse file tree 2 files changed +69
-4
lines changed Expand file tree Collapse file tree 2 files changed +69
-4
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+
3+ archive_linux () {
4+ local linux_dist=' CentOS-7-x86_64 CentOS-8-x86_64 Ubuntu-16.04-x86_64
5+ Ubuntu-18.04-x86_64 Ubuntu-20.04-x86_64 Debian-Buster-ARM Debian-Buster-ARM64'
6+
7+ cd " ${SOURCE_DIRECTORY} "
8+ for distribution in $linux_dist ; do
9+ tar -zcvf Linux-" ${distribution} " .tar.gz Linux-" ${distribution} "
10+ rm -r Linux-" ${distribution} "
11+ done
12+ }
13+
14+ archive_macOS () {
15+ local macOS_dist=' 10.14 10.15'
16+
17+ cd " ${SOURCE_DIRECTORY} "
18+ for distribution in $macOS_dist ; do
19+ tar -zcvf macOS-" ${distribution} " .tar.gz macOS-" ${distribution} "
20+ rm -r macOS-" ${distribution} "
21+ done
22+ }
23+
24+ archive_windows () {
25+ local windows_dist=' Win32 x64'
26+
27+ cd " ${SOURCE_DIRECTORY} "
28+ for distribution in $windows_dist ; do
29+ zip -r Windows-VS-16-2019-" ${distribution} " .zip Windows-VS-16-2019-" ${distribution} "
30+ rm -r Windows-VS-16-2019-" ${distribution} "
31+ done
32+ }
33+
34+ archive_linux
35+ archive_macOS
36+ archive_windows
Original file line number Diff line number Diff line change 11trigger :
2- - main
3- - master
4- - staging/*
5- - 20*
2+ branches :
3+ include :
4+ - main
5+ - master
6+ - staging/*
7+ - 20*
8+ tags :
9+ include :
10+ - v*
611
712pr :
813- main
@@ -177,3 +182,27 @@ stages:
177182 env :
178183 MAPPED_VAR : $(SERVER_ADDRESS)
179184 displayName : " Push artifacts to SW Downloads"
185+ - job : PushToGithubRelease
186+ condition : and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
187+ pool :
188+ vmImage : ' ubuntu-latest'
189+ steps :
190+ - task : DownloadPipelineArtifact@2
191+ inputs :
192+ path : ' $(Build.ArtifactStagingDirectory)'
193+ - bash : ./CI/travis/archive_artifacts.sh
194+ env :
195+ SOURCE_DIRECTORY : $(Build.ArtifactStagingDirectory)
196+ displayName : " Archive artifacts"
197+ - task : GithubRelease@0
198+ displayName : ' Attach artifacts to GitHub Release'
199+ inputs :
200+ gitHubConnection : libiio-release
201+ repositoryName : $(Build.Repository.Name)
202+ action : create
203+ target : $(Build.SourceVersion)
204+ tag : $(Build.SourceBranchName)
205+ title : " $(Build.SourceBranchName): Version <edit>"
206+ assets : $(Build.ArtifactStagingDirectory)/*
207+ addChangeLog : true
208+ isDraft : true
You can’t perform that action at this time.
0 commit comments