When using macOS zip tool from the command, you may want to exclude certain files by name or extensions. I often need to do this when automating extension bundles for a release. Here is the command I use to exclude __MACOSX and DS_Store files that macOS creates.
zip -r deploy.zip . -x ".\*" -x "\_\_MACOSX" -x "*DS_Store"
The -x flag exlcudes files that match the pattern. Here is a list of other options for the zip command line tool.