From 10b85ce690427ae8c2b0bd1ae32e5e46f7b63acf Mon Sep 17 00:00:00 2001 From: Dan Fiedler <151573964+danfiedler-msft@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:14:49 -0400 Subject: [PATCH] add publish to nuget and GitHub (#652) --- Changelog.md | 4 +++ Pipelines/cli/devskim-cli-release.yml | 35 ++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index b5e0c51e..434dbc53 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.44] - 2024-11-01 +### Pipeline +Pipeline only changes + ## [1.0.43] - 2024-10-29 ### Pipeline Pipeline only changes diff --git a/Pipelines/cli/devskim-cli-release.yml b/Pipelines/cli/devskim-cli-release.yml index 3553a595..7f707868 100644 --- a/Pipelines/cli/devskim-cli-release.yml +++ b/Pipelines/cli/devskim-cli-release.yml @@ -105,6 +105,14 @@ extends: - output: pipelineArtifact path: '$(Build.StagingDirectory)' artifact: 'Signed_Binaries_$(System.JobId)_$(System.JobAttempt)' + # see https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs/nuget-packages + - output: nuget + useDotNetTask: false + packagesToPush: '$(Build.StagingDirectory)/*.nupkg' + packageParentPath: '$(Build.StagingDirectory)' + nuGetFeedType: external + publishPackageMetadata: true + publishFeedCredentials: 'sdl-oss-nuget-publish' steps: - task: UseDotNet@2 inputs: @@ -533,4 +541,29 @@ extends: includeRootFolder: true archiveType: 'zip' archiveFile: '$(Build.StagingDirectory)/DevSkim_CLI_netcoreapp_$(ReleaseVersion).zip' - replaceExistingArchive: true \ No newline at end of file + replaceExistingArchive: true + - task: PowerShell@2 + displayName: Generate Hashes + inputs: + targetType: 'inline' + script: | + Get-ChildItem $(Build.StagingDirectory) | Foreach-Object { + $name = $_.Name + $tmp = (Get-FileHash "$(Build.StagingDirectory)\$name").Hash + Add-Content $(Build.StagingDirectory)\HASHES.txt "$tmp`t$name" + } + - task: GitHubRelease@1 + displayName: Release to GitHub + inputs: + gitHubConnection: 'github.com_gfs' + repositoryName: 'microsoft/DevSkim' + action: 'create' + target: '$(Build.SourceVersion)' + tagSource: 'userSpecifiedTag' + tag: 'v$(ReleaseVersion)' + title: 'DevSkim CLI v$(ReleaseVersion)' + assets: | + $(Build.StagingDirectory)/*.zip + $(Build.StagingDirectory)/HASHES.txt + changeLogCompareToRelease: 'lastNonDraftRelease' + changeLogType: 'commitBased' \ No newline at end of file