From 9dd1a1c9f07fdd2543aaae993bacf91ec4723d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AM=E7=A7=91=E6=8A=80?= Date: Mon, 16 Dec 2024 22:00:17 +0800 Subject: [PATCH] Update zip_flows_src.yml --- .github/workflows/zip_flows_src.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zip_flows_src.yml b/.github/workflows/zip_flows_src.yml index ef51ed1..a825368 100644 --- a/.github/workflows/zip_flows_src.yml +++ b/.github/workflows/zip_flows_src.yml @@ -17,7 +17,17 @@ jobs: uses: actions/checkout@v2 - name: Zip the worker file # 将 _worker.js 文件打包成 worker.js.zip - run: zip _worker.src.js.zip -j _worker.src.js -O _worker.js + run: | + if [ -f _worker.js ]; then + mv _worker.js _worker.js.bak + fi + cp _worker.src.js _worker.js + # 将 _worker.js 文件压缩到 _worker.src.js.zip 中 + zip _worker.src.js.zip _worker.js + rm _worker.js + if [ -f _worker.js.bak ]; then + mv _worker.js.bak _worker.js + fi - name: Commit and push the packaged file # 提交并推送打包后的文件 uses: EndBug/add-and-commit@v7