🌐 AI搜索 & 代理 主页
Skip to content

Commit a5c0951

Browse files
committed
Use custom install-mono
1 parent e21e737 commit a5c0951

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 'Install Mono'
2+
description: 'Install Mono'
3+
branding:
4+
icon: package
5+
color: blue
6+
inputs:
7+
arch:
8+
description: Architecture to install for
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Install on macOS (x86_64)
14+
if: runner.os == 'macOS' && inputs.arch == "x64"
15+
run: |
16+
brew update
17+
arch -x86_64 /usr/local/bin/brew install mono
18+
shell: sh
19+
20+
- name: Install on macOS
21+
if: runner.os == 'macOS' && inputs.arch != "x64"
22+
run: |
23+
brew update
24+
brew install mono
25+
shell: sh
26+
27+
- name: Install on Linux
28+
if: runner.os == 'Linux'
29+
run: |
30+
sudo apt update
31+
sudo apt install -y mono-runtime-sgen
32+
shell: sh
33+
34+
- name: Install on Windows (x86)
35+
if: runner.os == 'Windows' && inputs.arch == "x86"
36+
run: choco install --x86 -y mono
37+
shell: sh
38+
39+
- name: Install on Windows
40+
if: runner.os == 'Windows' && inputs.arch != "x86"
41+
run: choco install -y mono
42+
shell: sh
43+

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ jobs:
6161
dotnet-version: '8.0.x'
6262

6363
- name: Install Mono
64-
uses: ConorMacBride/install-package@v1.1.0
64+
uses: .github/actions/install-mono
6565
with:
66-
brew: mono
67-
choco: mono
68-
apt: mono-runtime-sgen
66+
arch: ${{ matrix.os.platform }}
6967

7068
- name: Set up Python ${{ matrix.python }}
7169
uses: astral-sh/setup-uv@v7

0 commit comments

Comments
 (0)