Skip to content

Commit 1ded88b

Browse files
authored
Update update_binaries.yml
1 parent 2710ad3 commit 1ded88b

File tree

1 file changed

+22
-37
lines changed

1 file changed

+22
-37
lines changed

.github/workflows/update_binaries.yml

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,28 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Checkout the repo
16-
uses: actions/checkout@v2
15+
- name: Checkout the repo
16+
uses: actions/checkout@v2
1717

18-
- name: Setup Git
19-
run: |
20-
git config user.name "GitHub Actions"
21-
git config user.email "actions@github.com"
18+
- name: Set up directories
19+
run: |
20+
mkdir -p PyPI/Package/src/webui
2221
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
22+
- name: Download and Extract Binaries
23+
run: |
24+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-clang-x64.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-linux-clang-x64
25+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-arm.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-linux-gcc-arm
26+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-arm64.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-linux-gcc-arm64
27+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-linux-gcc-x64.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-linux-gcc-x64
28+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-macos-clang-arm64.tar.gz -O - | tar -xz -C PyPI/Package/src/webui/webui-macos-clang-arm64
29+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-macos-clang-x64.tar.gz -O - | tar -xz -C PyPI/Package/src/webui/webui-macos-clang-x64
30+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-windows-gcc-x64.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-windows-gcc-x64
31+
wget -q https://github.com/webui-dev/webui/releases/download/2.4.0/webui-windows-msvc-x64.zip -O - | unzip -q -d PyPI/Package/src/webui/webui-windows-msvc-x64
4932
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
33+
- name: Commit and Push Changes
34+
run: |
35+
git config user.name github-actions
36+
git config user.email github-actions@github.com
37+
git add PyPI/Package/src/webui/
38+
git commit -m "Update WebUI binaries" || echo "No changes to commit"
39+
git push

0 commit comments

Comments
 (0)