fix(release): shc 静态编译解决 glibc 版本不匹配问题

- release.yml: CFLAGS=\

Signed-off-by: Maple <Mapleawa07@outlook.com>
This commit is contained in:
Maple
2026-07-08 11:45:32 +08:00
parent 747bef9808
commit b12179b084
2 changed files with 28 additions and 4 deletions

View File

@@ -26,6 +26,20 @@ jobs:
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build single script from modules
run: bash build.sh
- name: Install shc
run: |
sudo add-apt-repository ppa:neurobin/ppa -y
sudo apt-get update
sudo apt-get install -y shc
- name: Compile script to binary (statically linked)
run: |
CFLAGS="-static" shc -r -f dist/PVE-Tools.sh -o pve-tools
chmod +x pve-tools
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
@@ -38,9 +52,19 @@ jobs:
## 安装方式
**方式一:直接运行脚本 (推荐)**
```bash
bash <(curl -sSL https://github.com/PVE-Tools/PVE-Tools-9/blob/beta/PVE-Tools.sh)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/PVE-Tools/PVE-Tools-9/beta/dist/PVE-Tools.sh)"
```
**方式二:下载二进制文件**
```bash
chmod +x pve-tools
./pve-tools
```
files: |
pve-tools
dist/PVE-Tools.sh
draft: false
prerelease: true
env:

View File

@@ -33,11 +33,11 @@ jobs:
run: |
sudo add-apt-repository ppa:neurobin/ppa -y
sudo apt-get update
sudo apt-get install shc -y
sudo apt-get install -y shc
- name: Compile script to binary
- name: Compile script to binary (statically linked)
run: |
shc -f dist/PVE-Tools.sh -o pve-tools
CFLAGS="-static" shc -r -f dist/PVE-Tools.sh -o pve-tools
chmod +x pve-tools
- name: Generate release notes