File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,20 @@ jobs:
3030 "WinForms"
3131 "Wpf"
3232 )
33-
33+
3434 # Export folders array so it's accessible in the next step
3535 echo "folder_list=${folder_list[*]}" >> $GITHUB_ENV
3636
37+ # Get the absolute path of the current directory
38+ base_dir=$(pwd)
39+
3740 # Archive each folder
3841 for folder in "${folder_list[@]}"; do
3942 zip_file_name=$(echo "$folder" | sed 's/\//-/g').zip
40- zip -r "$zip_file_name" "$folder"
43+
44+ # Change into the folder and zip all contents to the base directory
45+ (cd "$folder" && zip -r "$base_dir/$zip_file_name" .)
46+
4147 echo $zip_file_name
4248 done
4349
4955 run : |
5056 # Convert the folders string back to an array
5157 IFS=' ' read -r -a folder_list <<< "$folder_list"
52-
58+
5359 for folder in "${folder_list[@]}"; do
5460 zip_file_name=$(echo "$folder" | sed 's/\//-/g').zip
5561 echo $zip_file_name
You can’t perform that action at this time.
0 commit comments