From 66176311c94c4f3cecb355fa0f2b09a7bd58dc28 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Dec 2024 13:03:30 -0500 Subject: [PATCH 1/2] ci: fixes hidi gh release --- .azure-pipelines/ci-build.yml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index e9aa773a3..922fde421 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -45,8 +45,8 @@ extends: targetPath: '$(Build.ArtifactStagingDirectory)/Nugets' - output: pipelineArtifact displayName: 'Publish Artifact: Hidi' - artifactName: Microsoft.OpenApi.Hidi-v$(hidiversion) - targetPath: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)' + artifactName: Hidi + targetPath: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi' steps: - task: UseDotNet@2 displayName: 'Use .NET 6' @@ -179,23 +179,13 @@ extends: MaxConcurrency: '50' MaxRetryAttempts: '5' PendingAnalysisWaitTimeoutMinutes: '5' - - - task: PowerShell@2 - displayName: "Get Hidi's version-number from .csproj" - inputs: - targetType: 'inline' - script: | - $xml = [Xml] (Get-Content .\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj) - $version = $xml.Project.PropertyGroup.Version - echo $version - echo "##vso[task.setvariable variable=hidiversion]$version" - + # publish hidi as an .exe - task: DotNetCoreCLI@2 displayName: publish Hidi as executable inputs: command: 'publish' - arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion) + arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj' publishWebProjects: False zipAfterPublish: false @@ -219,6 +209,9 @@ extends: - input: pipelineArtifact artifactName: Nugets targetPath: '$(Pipeline.Workspace)' + - input: pipelineArtifact + artifactName: Hidi + targetPath: '$(Pipeline.Workspace)' dependsOn: [] environment: nuget-org strategy: @@ -227,10 +220,6 @@ extends: pool: vmImage: ubuntu-latest steps: - - task: DownloadPipelineArtifact@2 - displayName: Download hidi executable from artifacts - inputs: - source: current - pwsh: | $artifactName = Get-ChildItem -Path $(Pipeline.Workspace)\Nugets -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1 $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", "" From 1f72ebf108467d15771a823f6fec7cac3c9164ad Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 19 Dec 2024 13:39:59 -0500 Subject: [PATCH 2/2] fix: redundant artifact upload Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 922fde421..449142a91 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -43,10 +43,6 @@ extends: displayName: 'Publish Artifact: Nugets' artifactName: Nugets targetPath: '$(Build.ArtifactStagingDirectory)/Nugets' - - output: pipelineArtifact - displayName: 'Publish Artifact: Hidi' - artifactName: Hidi - targetPath: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi' steps: - task: UseDotNet@2 displayName: 'Use .NET 6' @@ -209,9 +205,6 @@ extends: - input: pipelineArtifact artifactName: Nugets targetPath: '$(Pipeline.Workspace)' - - input: pipelineArtifact - artifactName: Hidi - targetPath: '$(Pipeline.Workspace)' dependsOn: [] environment: nuget-org strategy: