Here you can find the apple documentation:
https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution?language=objc
https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution/customizing_the_notarization_workflow?language=objc#3087734
Apple reported issues after uploading the package:
{
"logFormatVersion": 1,
"jobId": "c08645e2-fc56-4a84-ad57-ed6001c12201",
"status": "Invalid",
"statusSummary": "Archive contains critical validation errors",
"statusCode": 4000,
"archiveFilename": "vpn.pkg",
"uploadDate": "2019-04-30T12:49:30Z",
"sha256": "65dab4f9dcf728be04b22d7d5ab89e879e5296e645bbb0a0a8ce7c0f89324b90",
"ticketContents": null,
"issues": [
{
"severity": "error",
"code": null,
"path": "vpn.pkg/****.pkg Contents/Payload/Applications/***/Contents/Resources/OpenVPN/openvpn",
"message": "The executable does not have the hardened runtime enabled.",
"docUrl": null,
"architecture": "x86_64"
}
]
}