Skip to content

Commit

Permalink
fix: uncompress process
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef authored Dec 15, 2023
1 parent 9e810a2 commit 595bc4f
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 595bc4f

Please sign in to comment.