mirror of
https://github.com/YuleBest/LuminPro.git
synced 2026-12-04 00:54:42 +08:00
test: rust 编译测试
This commit is contained in:
1 parent
1f6191e6a1
commit
c35e1cb6ee
1 file changed
+10
-8
@@ -66,21 +66,23 @@ jobs:
|
||||
- name: Package module
|
||||
run: node build-module.js
|
||||
|
||||
# ── 4. 重命名 zip(加入 commit 短哈希)──────────────────────────────
|
||||
- name: Rename zip with commit hash
|
||||
# ── 4. 解压到暂存目录并命名 artifact ────────────────────────────────
|
||||
# upload-artifact 会对上传路径再套一层 zip;通过解压到 staging/ 再上传,
|
||||
# 让 upload-artifact 的 zip 本身就是可直接刷入的模块包,避免双重嵌套。
|
||||
- name: Prepare staging directory
|
||||
id: names
|
||||
run: |
|
||||
VERSION=$(grep '^version=' module.prop | cut -d= -f2 | tr -d '[:space:]')
|
||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||
ORIGINAL="LuminPro_${VERSION}.zip"
|
||||
FINAL="LuminPro_${VERSION}-${SHORT_SHA}.zip"
|
||||
mv "$ORIGINAL" "$FINAL"
|
||||
echo "zip=$FINAL" >> "$GITHUB_OUTPUT"
|
||||
ARTIFACT="LuminPro_${VERSION}-${SHORT_SHA}.zip"
|
||||
mkdir staging
|
||||
cd staging && unzip "../LuminPro_${VERSION}.zip"
|
||||
echo "artifact=$ARTIFACT" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# ── 5. 上传 artifact ─────────────────────────────────────────────────
|
||||
- name: Upload module zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.names.outputs.zip }}
|
||||
path: ${{ steps.names.outputs.zip }}
|
||||
name: ${{ steps.names.outputs.artifact }}
|
||||
path: staging/
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user