CCF/.azure-pipelines-templates/release.yml

80 строки
2.6 KiB
YAML

jobs:
- job: GitHubRelease
displayName: "GitHub Release"
dependsOn: ${{ parameters.depends_on }}
${{ insert }}: ${{ parameters.env }}
steps:
- task: DownloadPipelineArtifact@2
inputs:
source: current
patterns: "**"
path: $(Build.ArtifactStagingDirectory)
- script: |
set -ex
set -o pipefail
python3 ./scripts/extract-release-notes.py --target-git-version --append-mcr-images --describe-path-changes "./samples/constitution" | tee $(Build.BinariesDirectory)/rel-notes.md
displayName: Extract release notes
- script: |
set -ex
cd $(Build.ArtifactStagingDirectory)
ls
rename.ul + _ *+*.deb || true
ls
displayName: Remove characters that break GitHubRelease
- script: |
set -ex
sudo apt update
sudo apt install -y wget
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install -y dotnet-runtime-6.0
displayName: Install dotnet runtime for ESRP task
- task: EsrpCodeSigning@4
inputs:
ConnectedServiceName: "ESRP Code Signing 2023"
FolderPath: "$(Build.ArtifactStagingDirectory)"
Pattern: "*.deb"
signConfigType: "inlineSignParams"
inlineOperation: |
[
{
"KeyCode" : "CP-500207-Pgp",
"OperationCode" : "LinuxSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: "60"
MaxConcurrency: "50"
MaxRetryAttempts: "5"
PendingAnalysisWaitTimeoutMinutes: "5"
- script: |
set -ex
cd $(Build.ArtifactStagingDirectory)
ls
displayName: Display contents of artifact directory
- task: GitHubRelease@0
inputs:
gitHubConnection: ccf_release
repositoryName: "$(Build.Repository.Name)"
action: "create"
target: "$(Build.SourceVersion)"
tagSource: "auto"
assets: $(Build.ArtifactStagingDirectory)/**/*
assetUploadMode: "delete"
isDraft: true
isPreRelease: true
releaseNotesSource: "file"
releaseNotesFile: $(Build.BinariesDirectory)/rel-notes.md
addChangeLog: false
displayName: "GitHub Release"