From 0adda0e2baf17e51148b52352f3ae167f6e05c6c Mon Sep 17 00:00:00 2001 From: Matthias Gernand Date: Thu, 5 May 2022 17:09:15 +0200 Subject: [PATCH] Updated packages and added package publish to pipeline. (#3) --- README.md | 2 ++ azure-pipelines.yml | 32 +++++++++++++++++-- .../Fluxera.Temporal.MongoDB.csproj | 4 +-- src/Fluxera.Temporal/Fluxera.Temporal.csproj | 4 +-- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2b978ad..cffecbf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ +[![Build Status](https://dev.azure.com/fluxera/Foundation/_apis/build/status/GitHub/fluxera.Fluxera.Temporal?branchName=main)](https://dev.azure.com/fluxera/Foundation/_build/latest?definitionId=71&branchName=main) + # Fluxera.Temporal A libary that provides temporal types. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d322157..5e99bad 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,5 +54,33 @@ stages: displayName: 'Publish Package Artifacts' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'drop' - publishLocation: 'Container' \ No newline at end of file + ArtifactName: 'packages' + publishLocation: 'Container' + +- stage: PublishPackages + dependsOn: BuildAndTest + # Only publish packages for main branch. + condition: and(succeeded('BuildAndTest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) + jobs: + - job: PublishPackages + pool: + name: Default + steps: + # Download the created packages. + - task: DownloadBuildArtifacts@0 + displayName: 'Download NuGet Packges' + inputs: + buildType: 'current' + downloadType: 'single' + artifactName: 'packages' + downloadPath: '$(System.ArtifactsDirectory)' + # Publish the NuGet packages to the package feed. + - task: DotNetCoreCLI@2 + displayName: Push Nuget Package + inputs: + command: custom + custom: nuget + arguments: > + push $(System.ArtifactsDirectory)/**/*.nupkg + -s https://api.nuget.org/v3/index.json + -k $(NuGetApiKey) diff --git a/src/Fluxera.Temporal.MongoDB/Fluxera.Temporal.MongoDB.csproj b/src/Fluxera.Temporal.MongoDB/Fluxera.Temporal.MongoDB.csproj index 894699f..20e32df 100644 --- a/src/Fluxera.Temporal.MongoDB/Fluxera.Temporal.MongoDB.csproj +++ b/src/Fluxera.Temporal.MongoDB/Fluxera.Temporal.MongoDB.csproj @@ -22,13 +22,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Fluxera.Temporal/Fluxera.Temporal.csproj b/src/Fluxera.Temporal/Fluxera.Temporal.csproj index 85a82d3..ad0782f 100644 --- a/src/Fluxera.Temporal/Fluxera.Temporal.csproj +++ b/src/Fluxera.Temporal/Fluxera.Temporal.csproj @@ -22,8 +22,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive