From 6e25bc1c98a00e97cd3b947efc531521599721f5 Mon Sep 17 00:00:00 2001 From: xiehaijun Date: Sun, 27 Jul 2025 12:32:13 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/demo.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 生成sha256 --- .gitea/workflows/demo.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 6295220..b8da92c 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -203,7 +203,7 @@ jobs: with: path: my-artifact pattern: my-artifact-* - merge-multiple: true + # merge-multiple: true # 合并多个文件,会生成一个新的file-xxxx文件 # 下载其他仓库的制品 # github-token: ${{ secrets.GH_PAT }} # repository: actions/toolkit @@ -215,3 +215,16 @@ jobs: # find all-artifacts -type f -exec cp {} release/ \; find . -type f -exec cp {} release/ \; ls -lah ./release + - name: Generate SHA-256 + run: | + cd release + for f in *; do + if [[ "$RUNNER_OS" == "Windows" ]]; then + certutil -hashfile "$f" SHA256 > "$f.sha256" + sed -i 's/\r//' "$f.sha256" + else + shasum -a 256 "$f" > "$f.sha256" + fi + done + cd .. + ls -alh ./release/