Skip to content

Commit d4e663d

Browse files
committed
2 parents 9eaf345 + 5d1d06f commit d4e663d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Update WebUI Binaries
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- update-webui
9+
10+
jobs:
11+
update-binaries:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout the repo
16+
uses: actions/checkout@v2
17+
18+
- name: Setup Git
19+
run: |
20+
git config user.name "GitHub Actions"
21+
git config user.email "actions@github.com"
22+
23+
- name: Download and Extract Binaries
24+
run: |
25+
urls=(
26+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-clang-x64.zip"
27+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-arm.zip"
28+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-arm64.zip"
29+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-x64.zip"
30+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-macos-clang-x64.tar.gz"
31+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-windows-gcc-x64.zip"
32+
"https://github.com/webui-dev/webui/releases/download/2.4.0/webui-windows-msvc-x64.zip"
33+
)
34+
35+
for url in "${urls[@]}"; do
36+
filename=$(basename "$url")
37+
curl -L -O "$url"
38+
mkdir -p "PyPI/Package/src/webui/$filename"
39+
if [[ "$filename" == *.zip ]]; then
40+
unzip "$filename" -d "PyPI/Package/src/webui/$filename"
41+
elif [[ "$filename" == *.tar.gz ]]; then
42+
tar -xzf "$filename" -C "PyPI/Package/src/webui/$filename"
43+
else
44+
echo "Unsupported file type: $filename"
45+
exit 1
46+
fi
47+
rm "$filename"
48+
done
49+
50+
- name: Commit and Push Changes
51+
run: |
52+
git add PyPI/Package/src/webui/
53+
git commit -m "Update WebUI binaries" || echo "No changes to commit"
54+
git push

0 commit comments

Comments
 (0)