Apache Ant is a free and excellent tool to automate your software build processes.
So you just need to install Ant and a project specific “build.xml” file with all the tasks to build an artifact (ZIP) file.
This Slim 4 skeleton contains such an example file. See here: build.xml
To build an artifact just run: ant build