Great answer, thank you, it works.
I've made a bash script, which does a macOS release build:
#!/bin/bash
OS=`uname -s`
if [ "$OS" = "Darwin" ]; then
echo "macOS"
if [ ! -d osx_template.app ]; then
echo "copy osx.zip from editor data path to project directory"
cp ~/Library/Application\ Support/Godot/templates/3.5.stable/osx.zip .
echo "unzip osx.zip"
unzip osx.zip
echo "remove osx.zip"
rm osx.zip
fi
echo "run export template for macOS release build"
./osx_template.app/Contents/MacOS/godot_osx_release.64
else
echo "other OS than macOS"
fi