3
3
# Add steps that build, run tests, deploy, and more:
4
4
# https://aka.ms/yaml
5
5
6
- trigger :
6
+ trigger :
7
7
branches :
8
8
include :
9
9
- master
27
27
fetchTags : false
28
28
29
29
- task : InstallNanoMSBuildComponents@1
30
- displayName : Install .NET nanoFramework MSBuild components
30
+ displayName : Install .NET nanoFramework MSBuild components
31
31
32
32
- task : PowerShell@2
33
33
displayName : ' Build, test, pack'
@@ -48,21 +48,21 @@ steps:
48
48
targetType : ' inline'
49
49
script : |
50
50
Write-Host -Foreground Green "Downloading codecov binaries..."
51
-
52
- Invoke-WebRequest -Uri https://uploader.codecov.io/verification.gpg -OutFile codecov.asc
51
+
52
+ Invoke-WebRequest -Uri https://uploader.codecov.io/verification.gpg -OutFile codecov.asc
53
53
gpg.exe --import codecov.asc
54
-
54
+
55
55
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
56
56
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM -Outfile codecov.exe.SHA256SUM
57
57
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig
58
-
58
+
59
59
gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
60
60
If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) { echo "SHASUM verified" } Else {exit 1}
61
-
61
+
62
62
Write-Host -Foreground Green "Uploading to codecov..."
63
-
63
+
64
64
.\codecov.exe --dir "Artifacts/Coverage" -t "$env:CODECOV_TOKEN" --build "$(Build.BuildNumber)"
65
-
65
+
66
66
Write-Host -Foreground Green "✅ Uploaded to codecov."
67
67
pwsh : true
68
68
@@ -76,28 +76,28 @@ steps:
76
76
SourceFolder : ' $(Build.SourcesDirectory)/Artifacts'
77
77
Contents : |
78
78
**/*.nupkg
79
+ **/*.snupkg
79
80
**/*.symbols.nupkg
80
81
TargetFolder : ' $(Build.ArtifactStagingDirectory)'
81
82
flattenFolders : true
82
83
preserveTimestamp : true
83
84
retryCount : ' 3'
84
85
ignoreMakeDirErrors : true
85
86
87
+ - task : Bash@3
88
+ displayName : ' Push to nuget.org'
89
+ env :
90
+ NUGET_ORG_APIKEY : ' $(NUGET_ORG_APIKEY)'
91
+ inputs :
92
+ targetType : ' inline'
93
+ script : ' dotnet nuget push "*.nupkg" --skip-duplicate --api-key $(NUGET_ORG_APIKEY) --source https://api.nuget.org/v3/index.json'
94
+ workingDirectory : ' $(Build.ArtifactStagingDirectory)'
95
+
86
96
- task : NuGetCommand@2
87
97
displayName : Push to internal NuGet feed
88
98
inputs :
89
99
command : ' push'
90
- packagesToPush : ' $(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg '
100
+ packagesToPush : ' $(Build.ArtifactStagingDirectory)/**/*.nupkg'
91
101
nuGetFeedType : ' internal'
92
102
publishVstsFeed : ' fee4c64f-3e49-4618-9ea4-5a3167257c37/989275f4-a952-4abd-ae82-2e7a0cb97b9b'
93
103
allowPackageConflicts : true
94
-
95
- - task : NuGetCommand@2
96
- displayName : Push to nuget.org
97
- continueOnError : true # allowPackageConflicts option does not work with external feeds 🤷
98
- inputs :
99
- command : ' push'
100
- packagesToPush : ' $(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/'
101
- nuGetFeedType : ' external'
102
- publishFeedCredentials : ' nuget.org (UnitsNet)'
103
- allowPackageConflicts : true
0 commit comments