Skip to content

hmmmm

hmmmm #2

name: Create Release
on:
push:
branches:
- main # Adjust this to your main branch name
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name 'JadianRadiator'
git config --global user.email '[email protected]'
- name: Create and zip releases
run: |
# Function to zip the contents of a folder
function zip_folder_contents {
local folder="$1"
local zip_filename="$folder.zip"
pushd "$folder" >/dev/null || return
zip -r "../$zip_filename" .
popd >/dev/null || return
}
# Check if there are any folders to zip
if [ -d */ ]; then
# Loop through each directory in the repository
for folder in */; do
folder="${folder%/}" # Remove trailing slash
zip_folder_contents "$folder"
done
echo "Zip archives created successfully."
else
echo "No folders found to zip."
fi
- name: Commit and push changes
run: |
git add *.zip
git commit -m "Create release zip files"
git push