I found out the log:
"message": "The binary is not signed with a valid Developer ID certificate.",
But I am quite sure I have signed the file.
codesign -dvvv --entitlements :- myapp
shows:
Executable=/Volumes/NVME-970-EVO-1TB/Projects/VT/X/Installer and Packager/MacPackagerProjects/XX Software/build/XX.pkg
Identifier=XX
Format=generic
CodeDirectory v=20200 size=187 flags=0x10000(runtime) hashes=1+2 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=a5c3fca6702318ff49842d75eea536bd577698f1
CandidateCDHashFull sha1=a5c3fca6702318ff49842d75eea536bd577698f1
CandidateCDHash sha256=c168b1bf7db113dc987407ba3780698ffbc61903
CandidateCDHashFull sha256=c168b1bf7db113dc987407ba3780698ffbc619033baf832bc75f14cadcbfaa4d
Hash choices=sha1,sha256
CMSDigest=1da4c4bf06b725a1991a0068919b3841dbd24929c00054bc7e0f21b6d3127e8e
CMSDigestType=2
CDHash=c168b1bf7db113dc987407ba3780698ffbc61903
Signature size=9057
Authority=Developer ID Application: Mycompany (ZXJ5F9A8D)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=1 Sep 2021 at 3:56:27 PM
Info.plist=not bound
TeamIdentifier=ZXJ5F9A8D
Sealed Resources=none
Internal requirements count=1 size=188
What did I do wrong?