Skip to content

Commit

Permalink
fix: last chance
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef authored Dec 15, 2023
1 parent ae2728e commit 56e5114
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,41 +92,41 @@ jobs:
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Extract artifacts
run: |
tmp_dir="massa_tmp"
release_dir="massa_release"
mkdir -p "$tmp_dir"
mkdir -p "$release_dir"
for file in massa_artifacts_*; do
mv "$file" "$tmp_dir/"
done
cd "$tmp_dir" || exit 1
for file in *; do
if [[ -f "$file" ]]; then
echo "Extracting $file..."
if [[ "$file" == *".zip" ]]; then
unzip "$file" -d "../$release_dir/"
elif [[ "$file" == *".tar.gz" ]]; then
tar -xzf "$file" -C "../$release_dir/"
source_directory="artifacts"
tmp_directory="tmp"
release_directory="release"
mkdir -p "$tmp_directory"
mkdir -p "$release_directory"
for file in "$source_directory"/*.{zip,gz}; do
if [ -f "$file" ]; then
mv "$file" "$tmp_directory"
cd "$tmp_directory" || exit
if [[ "$file" == *.zip ]]; then
unzip -q "$(basename "$file")" -d "$release_directory"
rm "$(basename "$file")"
echo "Extracted $(basename "$file") to $release_directory"
elif [[ "$file" == *.gz ]]; then
gzip -d "$(basename "$file")"
echo "Extracted $(basename "$file") in $tmp_directory"
fi
fi
done
cd ..
rm -rf "$tmp_dir"
rm -rf "$tmp_directory"
- name: Generate checksums file
uses: jmgilman/actions-generate-checksum@v1
with:
method: sha256
patterns: |
massa_release/massa_*.zip
massa_release/massa_*.tar.gz
release/massa_*.zip
release/massa_*.tar.gz
output: checksums.txt
- name: Publish checksums file
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 56e5114

Please sign in to comment.