"Productbuild" won't build a Package

Hey,

I want to release a game on the Mac Store and I followed the Unity instructions but the Terminal won’t create a package of the game.

Work-Mac:Mac-AppleStore username$ productbuild --component GAMENAME.app /Applications --sign “3rd Party Mac Developer Installer: DEVNAME” GAMENAME.pkg

Usage: productbuild [–product ] {–component }
Build product with a self-contained bundle, e.g. for the Mac App Store

Usage: productbuild {–content }
Build product with in-app content

Usage: productbuild [–product ] {–root }
Build product with an xcodebuild destination root

Usage: productbuild [options] --distribution [–package-path ]
Build product with a distribution and the packages it references

Usage: productbuild --synthesize [–product ] {–package }
Synthesize and write a distribution from component packages

See productbuild(1) for details.

That’s all I receive from the Terminal.
The codesign with the entitlements worked but only when I added --deep behind the command.
I’m using Unity version 5.2.1f1
Hope someone can help here.

It might be worth wrapping the .pkg and .app filenames in " ", just in case you have any spaces or special characters in the name, and I’m assuming your DEVNAME contains the app id prefix in brackets (it should automatically be appended to the profile name). This is the command I’m using, for reference:

productbuild --component “APP NAME.app” /Applications --sign “3rd Party Mac Developer Installer: DEVNAME (APPID_PREFIX)” “APP NAME.pkg”