Files
PVE-Tools-9/.github/workflows/beta-release.yml
Maple d8b3d9fbdf feat: release v11.0.0 Liino — menu framework, risk guards, CI gates
Unify all menus on lib/menu.sh (run_menu), harden GPU/GRUB writes with
two-tier confirms and markers, fix remote/self-update to Releases assets,
and close real CI quality gates with SHA256SUMS. Bump to 11.0.0 / Liino.
2026-07-28 14:43:58 +08:00

68 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Release to Beta
on:
push:
tags:
- 'v*.*.*-beta*'
- '*.*.*-beta*'
- 'v*.*.*-alpha*'
- '*.*.*-alpha*'
permissions:
contents: write
jobs:
beta-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from tag
id: get_version
run: |
TAG=${GITHUB_REF#refs/tags/}
VERSION=${TAG#v}
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build single script from modules
run: bash build.sh
- name: Validate build output before release
run: |
# beta 同样不跳过构建质量校验版本号断言放宽beta 标签允许与 config 不同步)
bash -n dist/PVE-Tools.sh
shellcheck --severity=error -f gcc dist/PVE-Tools.sh
diff <(grep -rhoE '^[a-zA-Z_][a-zA-Z0-9_]*\(\)' lib src/modules --include='*.sh' | sort -u) \
<(grep -hoE '^[a-zA-Z_][a-zA-Z0-9_]*\(\)' dist/PVE-Tools.sh | sort -u) \
|| { echo "构建产物与源码函数集合不一致,中止发布"; exit 1; }
- name: Generate checksums
run: |
cd dist && sha256sum PVE-Tools.sh > SHA256SUMS.txt && cat SHA256SUMS.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_version.outputs.TAG }}
name: Beta Release ${{ steps.get_version.outputs.TAG }}
body: |
## Beta 版本 ${{ steps.get_version.outputs.VERSION }}
⚠️ 这是测试版本,可能存在不稳定因素,请勿在生产环境使用
## 安装方式
**直接运行脚本 (推荐)**
```bash
bash <(curl -sSL https://pve.u3u.icu/PVE-Tools.sh)
```
files: |
dist/PVE-Tools.sh
dist/SHA256SUMS.txt
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}