Skip to content

Commit 955301b

Browse files
author
dompl
committed
test
1 parent c127635 commit 955301b

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/build-release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,25 @@ jobs:
202202
git clean -fdx || true
203203
fi
204204
205-
# 确认有要提交的 release 目录
206-
if [ ! -d release ]; then
207-
echo "❌ release 目录不存在,无法提交" >&2
208-
exit 1
205+
# 查找非 latest 的 TIPA 文件,并更新 latest 复制
206+
TIPA_FILE=$(find ./release -name "*.tipa" ! -name "*_latest.tipa" 2>/dev/null | head -1 || echo "")
207+
LATEST_FILE=./release/TrollScript_latest.tipa
208+
209+
if [ -n "$TIPA_FILE" ]; then
210+
echo "📦 Found tipa: $TIPA_FILE — updating $LATEST_FILE"
211+
cp -f "$TIPA_FILE" "$LATEST_FILE"
212+
else
213+
if [ -f "$LATEST_FILE" ]; then
214+
echo "ℹ️ No new tipa found, using existing $LATEST_FILE"
215+
else
216+
echo "❌ No tipa file found to mark as latest" >&2
217+
exit 1
218+
fi
209219
fi
210220
211-
# 强制添加并提交 release 目录(覆盖模式)
212-
git add -f release
213-
git commit -m "chore(release): add build artifacts" || echo "No changes to commit"
221+
# 强制添加并提交 latest TIPA(覆盖模式)
222+
git add -f "$LATEST_FILE"
223+
git commit -m "chore(release): update TrollScript_latest.tipa" || echo "No changes to commit"
214224
215225
# 强制推送覆盖远程 release 分支
216226
git push -f origin release

0 commit comments

Comments
 (0)