Skip to content

Commit

Permalink
may be may be
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef authored Dec 15, 2023
1 parent a1ccfcd commit ad90578
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,12 @@ jobs:
path: artifacts
- name: Extract artifacts
run: |
source_directory="$(pwd)/artifacts"
tmp_directory="$(pwd)/tmp_directory"
release_directory="$(pwd)/massa_release"
source_directory="artifacts"
release_directory="release"
mkdir -p "$tmp_directory"
mkdir -p "$release_directory"
find "$source_directory" -type f \( -name "*.zip" -o -name "*.gz" \) -print0 | while IFS= read -r -d '' file; do
echo "Processing "$file")"
if [[ "$file" == *.zip ]]; then
mv "$file" "$tmp_directory"
cd "$tmp_directory" || exit
unzip -q "$(basename "$file")" -d "$release_directory"
rm "$(basename "$file")"
echo "Extracted $(basename "$file") to $release_directory"
cd - > /dev/null || exit
elif [[ "$file" == *.gz ]]; then
mv "$file" "$tmp_directory"
cd "$tmp_directory" || exit
tar -xzf "$(basename "$file")" -C "$release_directory"
rm "$(basename "$file")"
echo "Extracted $(basename "$file") to $release_directory"
cd - > /dev/null || exit
fi
done
rm -rf "$tmp_directory"
find "$source_directory" -type f \( -name "*.zip" -o -name "*.gz" \) -exec mv -t "$release_directory" {} +
- name: Generate checksums file
uses: jmgilman/actions-generate-checksum@v1
with:
Expand Down

0 comments on commit ad90578

Please sign in to comment.