From d041149c2e984e5bf587918f12c04d76178534d3 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 5 Feb 2024 22:03:17 +0100 Subject: [PATCH] fix double entrie and wrong name --- .github/workflows/msbuild.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index d207794..9688126 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -64,10 +64,15 @@ jobs: - name: Generate SHA256 hashes id: hashes run: | + declare -A processed_files for file in x64/Release/*; do - echo "$(basename "$file"): $(sha256sum "$file" | cut -d' ' -f1)" >> hashes.txt + file_name=$(basename "$file") + if [ -z "${processed_files[$file_name]}" ]; then + echo "$file_name: $(sha256sum "$file" | cut -d' ' -f1)" >> hashes.txt + processed_files[$file_name]="processed" + fi done - cat hashes.txt # Debug print the content + cat hashes.txt echo "::set-output name=hashes::$(cat hashes.txt)" - name: Create Release @@ -79,7 +84,7 @@ jobs: body: | **File Hashes:** ``` - ${{ steps.generate_hashes.outputs.hashes }} + ${{ steps.hashes.outputs.hashes }} ``` files: x64/Release/* token: ${{ secrets.GITHUB_TOKEN }}