Skip to content

Commit

Permalink
bug(ci): fix NuGet publish and restore sources
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Nov 20, 2024
1 parent 74f70a9 commit 106104f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
global-json-file: global.json
dotnet-version: |
8.x
- name: Add the GitHub source
run: dotnet nuget add source --name "github.com" "https://nuget.pkg.github.com/fsprojects/index.json"

- name: Publish to GitHub
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
Expand Down
12 changes: 12 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="github.com" value="https://nuget.pkg.github.com/fsprojects/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
4 changes: 3 additions & 1 deletion build/build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,11 @@ let publishTo (source : PushSource) _ =
}
PushParams = {
o.PushParams with
// TODO: Uncomment when migrated to F# 9
//NoSymbols = source.IsGitHub
Source =
match source with
| NuGet -> None
| NuGet -> Some "nuget.org"
| GitHub -> Some "github.com"
ApiKey =
match source with
Expand Down

0 comments on commit 106104f

Please sign in to comment.