From 542e220bdfd5fb34a86827fdba6844693994a679 Mon Sep 17 00:00:00 2001 From: Philipp Wagner Date: Wed, 30 Oct 2019 13:10:16 +0000 Subject: [PATCH] [ci] Produce final release artifact and upload it - Upload all release tarballs to Azure Pipelines - Upload all release tarballs from tags to GitHub releases --- azure-pipelines.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c6e1dd1f9a15f..bd90dc8b32316 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -215,3 +215,36 @@ stages: - publish: $(Build.ArtifactStagingDirectory)/dist-partial-top_earlgrey_nexysvideo.tar artifact: dist-partial-top_earlgrey_nexysvideo displayName: 'Upload partial distribution artifacts' + + - job: "deploy_releaseartifacts" + displayName: "Package and deploy release distribution" + pool: + vmImage: "ubuntu-16.04" + dependsOn: + - sw_build + - top_earlgrey_verilator + - top_earlgrey_nexysvideo + steps: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + targetPath: '$(Build.ArtifactStagingDirectory)/dist-partial-download' + - bash: | + OT_VERSION=$(git describe --always) + cd "$(Build.ArtifactStagingDirectory)" + find "$(Build.ArtifactStagingDirectory)/dist-partial-download" -iname '*.tar' -exec tar --overwrite -xf {} \; + mv dist opentitan-$OT_VERSION + mkdir -p dist-final + tar -cJf dist-final/opentitan-$OT_VERSION.tar.xz opentitan-$OT_VERSION + displayName: 'Create final dist directory out of partial ones' + - publish: $(Build.ArtifactStagingDirectory)/dist-final + artifact: opentitan-dist + displayName: "Upload release artifacts as Azure artifact" + - task: GithubRelease@0 + displayName: 'Upload to GitHub releases (only tags)' + inputs: + gitHubConnection: opentitan-release-upload + repositoryName: lowrisc/opentitan + addChangeLog: false + assets: | + $(Build.ArtifactStagingDirectory)/dist-final/*