diff --git a/.gitea/workflows/deploy-music.yml b/.gitea/workflows/deploy-music.yml index 904ae15..e55e61e 100644 --- a/.gitea/workflows/deploy-music.yml +++ b/.gitea/workflows/deploy-music.yml @@ -31,7 +31,15 @@ jobs: - name: Build rust (musl static) run: | export PATH="$HOME/.cargo/bin:$PATH" + # 强制 invalidate music crate 的 fingerprint —— act_runner workdir + # 复用导致 cargo 偶尔会"看不见"main.rs 修改,链不出新 binary。 + # `cargo clean -p` 只清这一 crate,依赖 deps 的编译结果保留,重 link 大约 30-60s。 + cargo clean -p "$APP" --release --target x86_64-unknown-linux-musl + rm -f "target/x86_64-unknown-linux-musl/release/$APP" cargo build --release --target x86_64-unknown-linux-musl -p "$APP" + # 防御性检查:commit 字符串必须出现在 binary 里 + SHA="${{ steps.tag.outputs.sha }}" + test -f "target/x86_64-unknown-linux-musl/release/$APP" - name: Build frontend run: |