From 595bc4f2db90bc0c77ef2ce21ad1db26f2b9baab Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Fri, 15 Dec 2023 18:56:10 +0100 Subject: [PATCH] fix: uncompress process --- .github/workflows/cd.yml | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ca9fdbf575..4bb861cf19 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -92,17 +92,35 @@ jobs: steps: - name: Download all artifacts uses: actions/download-artifact@v4 - - name: Create release directory - run: mkdir massa_release && ls -al - - name: Unzip artifacts + - name: Uncompress all artifacts run: | + # Define the temporary and release directories + tmp_dir="massa_tmp" + release_dir="massa_release" + + # Create the temporary directory if it doesn't exist + mkdir -p "$tmp_dir" + + # Move matching artifacts to the temporary directory for file in massa_artifacts_*; do - if [[ "$file" == *.zip ]]; then - unzip "$file" -d massa_release/ - elif [[ "$file" == *.tar.gz ]]; then - tar -xzf "$file" -C massa_release/ - fi + mv "$file" "$tmp_dir/" done + + # Create the release directory if it doesn't exist + mkdir -p "$release_dir" + + # Extract files from the temporary directory to the release directory + for file in "$tmp_dir"/*; do + if [[ "$file" == *.zip ]]; then + unzip "$file" -d "$release_dir/" + elif [[ "$file" == *.tar.gz ]]; then + tar -xzf "$file" -C "$release_dir/" + fi + done + + # Remove the temporary directory + rm -rf "$tmp_dir" + - name: Generate checksums file uses: jmgilman/actions-generate-checksum@v1 with: