Skip to content

Commit 5b239cc

Browse files
krauthaufenclaude
andauthored
Claude/fix macos publish mono 3 ps kw (#11)
* Replace mono/nuget.exe with dotnet nuget commands Modern macOS runners (macos-15, macos-14) no longer have mono pre-installed, causing publish actions to fail. This change replaces all mono-based NuGet commands with native dotnet CLI equivalents: - Replaced 'mono .config/nuget.exe sources add' with 'dotnet nuget add source' - Replaced 'mono .config/nuget.exe setApiKey' with 'dotnet nuget update source' - Moved dotnet installation step before NuGet credential setup to ensure dotnet is available when needed The dotnet CLI NuGet commands are cross-platform and don't require mono, resolving the macOS x64 publish failure while maintaining functionality across all platforms (macOS, Linux, Windows). * Install mono via brew for vcpkg NuGet binary caching vcpkg internally requires mono to execute nuget.exe for NuGet binary caching operations on macOS/Linux, even when NuGet sources are configured via dotnet CLI. Since vcpkg hasn't yet implemented support for using dotnet nuget directly, we need to install mono. Changes: - Added 'brew install mono' step to all macOS workflow jobs - Reverted NuGet credential setup to use 'mono .config/nuget.exe' - Reverted buildnative.sh to use mono for setting NuGet API keys - Moved dotnet installation to after the build step (only needed for dotnet tool restore, paket restore, and running tests) This resolves the "Could not fetch mono" error from vcpkg while maintaining functionality across all platforms. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 76ce083 commit 5b239cc

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v2
16-
- name: Install Dotnet
17-
uses: actions/setup-dotnet@v4
18-
with:
19-
global-json-file: global.json
16+
- name: Install Mono
17+
run: brew install mono
2018
- name: 'Setup NuGet Credentials'
2119
shell: 'bash'
2220
run: >
@@ -35,6 +33,10 @@ jobs:
3533
env:
3634
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3735
run: ./buildnative.sh x86_64
36+
- name: Install Dotnet
37+
uses: actions/setup-dotnet@v4
38+
with:
39+
global-json-file: global.json
3840
- name: Restore Tools
3941
run: dotnet tool restore
4042
- name: Restore
@@ -52,10 +54,8 @@ jobs:
5254
steps:
5355
- name: Checkout
5456
uses: actions/checkout@v2
55-
- name: Install Dotnet
56-
uses: actions/setup-dotnet@v4
57-
with:
58-
global-json-file: global.json
57+
- name: Install Mono
58+
run: brew install mono
5959
- name: 'Setup NuGet Credentials'
6060
shell: 'bash'
6161
run: >
@@ -166,10 +166,8 @@ jobs:
166166
steps:
167167
- name: Checkout
168168
uses: actions/checkout@v2
169-
- name: Install Dotnet
170-
uses: actions/setup-dotnet@v4
171-
with:
172-
global-json-file: global.json
169+
- name: Install Mono
170+
run: brew install mono
173171
- name: 'Setup NuGet Credentials'
174172
shell: 'bash'
175173
run: >
@@ -205,10 +203,8 @@ jobs:
205203
steps:
206204
- name: Checkout
207205
uses: actions/checkout@v2
208-
- name: Install Dotnet
209-
uses: actions/setup-dotnet@v4
210-
with:
211-
global-json-file: global.json
206+
- name: Install Mono
207+
run: brew install mono
212208
- name: 'Setup NuGet Credentials'
213209
shell: 'bash'
214210
run: >

0 commit comments

Comments
 (0)