From 975108744cf962571cb23f56bd4e478273e2b187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Mon, 26 Nov 2018 11:02:06 +0000 Subject: [PATCH] Work CD-CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch to update native assembly declaration task. - Fix conditions for update github releases. - Add step to publish to NuGet on tag. Signed-off-by: José Simões --- azure-pipelines.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 322648a..fa825a0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -122,7 +122,7 @@ steps: SourceFolder: '$(System.DefaultWorkingDirectory)' Contents: 'CHANGELOG.md' TargetFolder: '$(Build.ArtifactStagingDirectory)' - condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ) ) + condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) ) displayName: Copy Changelog # push new changelog to GitHub repo @@ -185,15 +185,15 @@ steps: condition: succeeded() displayName: Push NuGet packages to MyGet -# # push NuGet class lib package to NuGet (happens on tag builds for any branch) -# - task: NuGetCommand@2 -# inputs: -# command: push -# nuGetFeedType: external -# packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg' -# publishFeedCredentials: 'NuGet' -# condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) -# displayName: Push NuGet packages to NuGet +# push NuGet class lib package to NuGet (happens on tag builds for any branch) +- task: NuGetCommand@2 + inputs: + command: push + nuGetFeedType: external + packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg' + publishFeedCredentials: 'NuGet' + condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) + displayName: Push NuGet packages to NuGet # create or update GitHub release - task: GitHubReleasePublish@1 @@ -233,12 +233,16 @@ steps: condition: and( succeeded(), not( startsWith(variables['Build.SourceBranch'], 'refs/pull') ), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) displayName: Create/Update GitHub release -# step from template @ nf-tools repo # update assembly declaration in nf-interpreter -- template: azure-pipelines-templates/update-assembly-declarations.yml@templates - parameters: - sourceFile: 'nf_networking_sntp.cpp' +- task: UpdateNativeAssemblyDeclaration@1 + inputs: + sourceFileName: 'nf_networking_sntp.cpp' classLibName: $(nugetPackageName) + gitHubToken: $(GitHubToken) + nuGetVersion: $(MY_NUGET_VERSION) + assemblyVersion: $(NBGV_Version) + condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ) + displayName: Update assembly declaration in nf-interpreter # step from template @ nf-tools repo - template: azure-pipelines-templates/discord-webhook-task.yml@templates