Skip to content

Commit b284e7e

Browse files
committed
Work CI-CD
- Replace NuGet installer with template. - Minor fixes in Azure yaml. - Fix NuGet config. ***NO_CI***
1 parent 7395332 commit b284e7e

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

NuGet.Config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4+
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
45
<add key="NuGet" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5-
<add key="MyGet nanoFramework dev" value="https://www.myget.org/F/nanoframework-dev/api/v3/index.json" protocolVersion="3" />
66
</packageSources>
77
</configuration>

azure-pipelines.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
trigger:
22
branches:
3-
include: ["main", "develop", "release*", "refs/tags/*" ]
3+
include: [main, develop, "release-*" ]
44
paths:
5-
exclude: [ "doc", "*.md", ".gitignore", "README.md" ]
5+
exclude: [README.md, LICENSE.md, NuGet.Config, .github_changelog_generator, .gitignore]
6+
tags:
7+
include: ["v*"]
68

79
# no pr config, we want to trigger builds for all PRs on all branches
810

@@ -129,7 +131,7 @@ jobs:
129131
vmImage: 'windows-2019'
130132

131133
variables:
132-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
134+
DOTNET_NOLOGO: true
133135
buildPlatform: 'x64'
134136
buildConfiguration: 'Release'
135137
solution: 'nanoFirmwareFlasher.sln'
@@ -145,10 +147,7 @@ jobs:
145147
git config --global user.name "nfbot"
146148
displayName: Setup git identity
147149
148-
- task: NuGetToolInstaller@0
149-
displayName: 'Install specifc version of NuGet'
150-
inputs:
151-
versionSpec: '5.8.0'
150+
- template: azure-pipelines-templates/install-nuget.yml@templates
152151

153152
- task: UseDotNet@2
154153
displayName: Install .NET Core SDK
@@ -261,9 +260,9 @@ jobs:
261260
ArtifactName: deployables
262261
ArtifactType: Container
263262

264-
# push NuGet packages to AzureArtifacts feed (always happens except on PR builds)
263+
# push NuGet packages to AzureArtifacts feed (happens on all builds except PRs)
265264
- task: NuGetCommand@2
266-
condition: succeeded()
265+
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
267266
displayName: Push NuGet packages to AzureArtifacts
268267
continueOnError: true
269268
inputs:
@@ -272,7 +271,7 @@ jobs:
272271
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
273272
publishFeedCredentials: 'AzureArtifacts-nanoFirmwareFlasher'
274273

275-
# push NuGet class lib package to NuGet (happens on tag builds for any branch)
274+
# push NuGet class lib package to NuGet (happens on all builds except PRs)
276275
- task: NuGetCommand@2
277276
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
278277
displayName: Push NuGet packages to NuGet

0 commit comments

Comments
 (0)