|
13 | 13 | - "*" |
14 | 14 |
|
15 | 15 | variables: |
16 | | - BuildConfiguration: Release |
17 | | - SolutionFile: BitNet-b1.58-Sharp.slnx |
18 | | - CoreProject: src/BitNetSharp.Core/BitNetSharp.Core.csproj |
19 | | - AppProject: src/BitNetSharp.App/BitNetSharp.App.csproj |
20 | | - CoreArtifactName: BitNetSharp.Core-nuget |
21 | | - ToolArtifactName: BitNetSharp.App-dotnet-tool |
22 | | - NuGetFeedUrl: "" |
23 | | - NuGetApiKey: "" |
| 16 | + - group: McpServer |
| 17 | + - name: BuildConfiguration |
| 18 | + value: Release |
| 19 | + - name: SolutionFile |
| 20 | + value: BitNet-b1.58-Sharp.slnx |
| 21 | + - name: CoreProject |
| 22 | + value: src/BitNetSharp.Core/BitNetSharp.Core.csproj |
| 23 | + - name: AppProject |
| 24 | + value: src/BitNetSharp.App/BitNetSharp.App.csproj |
| 25 | + - name: CoreArtifactName |
| 26 | + value: BitNetSharp.Core-nuget |
| 27 | + - name: ToolArtifactName |
| 28 | + value: BitNetSharp.App-dotnet-tool |
| 29 | + - name: NuGetFeedUrl |
| 30 | + value: "https://nuget.pkg.github.com/sharpninja/index.json" |
24 | 31 |
|
25 | 32 | stages: |
26 | 33 | - stage: build |
@@ -71,6 +78,12 @@ stages: |
71 | 78 | - script: dotnet test "$(SolutionFile)" --configuration "$(BuildConfiguration)" --no-build --no-restore --filter "Category!=SlowLane" |
72 | 79 | displayName: Test |
73 | 80 |
|
| 81 | + - pwsh: | |
| 82 | + $modelsDirectory = "$(Build.SourcesDirectory)/src/BitNetSharp.Core/Data/Models" |
| 83 | + New-Item -ItemType Directory -Force -Path $modelsDirectory | Out-Null |
| 84 | + dotnet run --framework net9.0 --project "$(Build.SourcesDirectory)/$(AppProject)" --configuration "$(BuildConfiguration)" --no-build -- export --output="$modelsDirectory/bitnet-b1.58-default.gguf" |
| 85 | + displayName: Generate default model weights |
| 86 | +
|
74 | 87 | - pwsh: | |
75 | 88 | $outputDirectory = "$(Build.ArtifactStagingDirectory)/packages/core" |
76 | 89 | New-Item -ItemType Directory -Force -Path $outputDirectory | Out-Null |
@@ -157,16 +170,9 @@ stages: |
157 | 170 |
|
158 | 171 | foreach ($package in $packages) |
159 | 172 | { |
160 | | - if ([string]::IsNullOrWhiteSpace($env:NUGET_API_KEY)) |
161 | | - { |
162 | | - dotnet nuget push $package.FullName --source $env:NUGET_SOURCE --api-key AzureArtifacts --skip-duplicate |
163 | | - } |
164 | | - else |
165 | | - { |
166 | | - dotnet nuget push $package.FullName --source $env:NUGET_SOURCE --api-key $env:NUGET_API_KEY --skip-duplicate |
167 | | - } |
| 173 | + dotnet nuget push $package.FullName --source $env:NUGET_SOURCE --api-key $env:NUGET_API_KEY --skip-duplicate |
168 | 174 | } |
169 | 175 | displayName: Publish packages to NuGet feed |
170 | 176 | env: |
171 | 177 | NUGET_SOURCE: $(NuGetFeedUrl) |
172 | | - NUGET_API_KEY: $(NuGetApiKey) |
| 178 | + NUGET_API_KEY: $(GH_TOKEN) |
0 commit comments