First get a Developer ID signing key from apple. You can get this through xcode if you're subscribed to their developer service.
Once you have a Developer ID in your keychain; you need to add a per-app password for notarytool.
To do so go to your Apple account settings and add a new per-app-password; copy the password.
Run xcrun notarytool store-credentials --password "<INSERT PER-APP-PASSWORD HERE>" "notarytool".
After this you can add sign.sh and entitlements.plist to the outside of your Unity application, first time run chmod +x sign.sh.
You can then run ./sign.sh <name of app>.app and wait.
If the signing fails; you can use xcrun notarytool log <The ID that was displayed during signing> --keychain-profile "notarytool"
to determine why signing failed.
./sign.sh <path of your app bundle>
This script only works if you have a single signing identity in your current account's keychain. If you are signing with
multiple identities, update the part of the script that refers to "Developer ID" and put in the full name of the developer id in your
keychain.