Skip to content

Commit

Permalink
ci: tar downloaded folders
Browse files Browse the repository at this point in the history
  • Loading branch information
GuihVicentini committed Dec 16, 2023
1 parent c6a1893 commit 7ba65e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ jobs:
run: ls -alR
working-directory: bin/

- name: Compress files
run: ./tar-folders.sh bin

# - name: Publish Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: "bin/cli-utils-*/**/build/native/nativeCompile/*"
# artifacts: "bin/cli-utils-*"
# tag: ${{ steps.tag_version.outputs.new_tag }}
# name: Release ${{ steps.tag_version.outputs.new_tag }}
# body: ${{ steps.tag_version.outputs.changelog }}
14 changes: 14 additions & 0 deletions tar-folders.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Check if a directory path is provided
if [ -z "$1" ]; then
echo "Usage: $0 <directory>"
exit 1
fi

# Iterate through each folder in the specified directory
for folder in "$1"/*/; do
folder_name=$(basename "$folder")
tar -czf "${folder_name}.tar.gz" "$folder_name"
echo "Created ${folder_name}.tar.gz"
done

0 comments on commit 7ba65e3

Please sign in to comment.