Skip to content

Commit 9ff1259

Browse files
committed
feat: add macOS build and upload artifacts for LLOneBot and PMHQ
1 parent 1ca9109 commit 9ff1259

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

.github/workflows/build-artifacts.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,45 @@ jobs:
6969
name: LLOneBot-win-x64-ffmpeg
7070
path: LLOneBot-win-x64-ffmpeg.zip
7171
retention-days: 30
72+
73+
- name: Compress for mac-x64
74+
run: |
75+
mkdir llonebot-mac-x64
76+
mkdir llonebot-mac-x64/llonebot
77+
mkdir llonebot-mac-x64/
78+
cp -r ./dist/* llonebot-mac-x64/llonebot/
79+
wget https://github.com/LLOneBot/exe/releases/latest/download/node-darwin-x64 -O llonebot-mac-x64/llonebot/node
80+
wget https://github.com/linyuchen/PMHQ/releases/latest/download/pmhq-mac-x64.zip
81+
unzip pmhq-win-x64.zip
82+
rm pmhq-mac-x64.zip
83+
mv pmhq llonebot-mac-x64/
84+
wget https://raw.githubusercontent.com/LLOneBot/LLOneBot/refs/heads/main/script/start-mac.sh -O llonebot-mac-x64/start.sh
85+
zip -r LLOneBot-mac-x64.zip ./llonebot-mac-x64/*
86+
87+
- name: Upload LLOneBot-mac-x64.zip
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: LLOneBot-mac-x64
91+
path: LLOneBot-mac-x64.zip
92+
retention-days: 30
93+
94+
- name: Compress for mac-arm64
95+
run: |
96+
mkdir llonebot-mac-arm64
97+
mkdir llonebot-mac-arm64/llonebot
98+
mkdir llonebot-mac-arm64/
99+
cp -r ./dist/* llonebot-mac-arm64/llonebot/
100+
wget https://github.com/LLOneBot/exe/releases/latest/download/node-darwin-arm64 -O llonebot-mac-arm64/llonebot/node
101+
wget https://github.com/linyuchen/PMHQ/releases/latest/download/pmhq-mac-arm64.zip
102+
unzip pmhq-win-arm64.zip
103+
rm pmhq-mac-arm64.zip
104+
mv pmhq llonebot-mac-arm64/
105+
wget https://raw.githubusercontent.com/LLOneBot/LLOneBot/refs/heads/main/script/start-mac.sh -O llonebot-mac-arm64/start.sh
106+
zip -r LLOneBot-mac-arm64.zip ./llonebot-mac-arm64/*
107+
108+
- name: Upload LLOneBot-mac-arm64.zip
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: LLOneBot-mac-arm64
112+
path: LLOneBot-mac-arm64.zip
113+
retention-days: 30

script/start-mac.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
22

33
chmod u+x $SCRIPT_DIR/llonebot/node
4-
$SCRIPT_DIR/llonebot/node --enable-source-maps $SCRIPT_DIR/llonebot/llonebot.js &
4+
$SCRIPT_DIR/llonebot/node $SCRIPT_DIR/llonebot/llonebot.js &
55

66
chmod u+x $SCRIPT_DIR/pmhq/pmhq
77

8-
sudo $SCRIPT_DIR/pmhq/pmhq
8+
osascript -e "do shell script \"$SCRIPT_DIR/pmhq/pmhq\" with administrator privileges"

0 commit comments

Comments
 (0)