Decide where to keep the signing key
The Mac's owner can reach the running virtual machine. A Developer ID private key can sign software under your team's identity. NVTO does not recommend putting a long-lived Developer ID private key on a machine you do not control. See the security model.
Use the rented Mac to build the app, then copy the build to a Mac you control for signing and packaging. If you use the rented Mac to notarize an already signed build, transfer the signed file and use a dedicated App Store Connect team API key for notarytool. Assign the narrowest role your team can use for notarization. A team key applies across the team's apps.
Sign the app and prepare the download
Use Xcode or codesign with a Developer ID Application signing identity. Enable the hardened runtime and use a secure timestamp. Sign any bundled code, such as helpers and frameworks, before signing the app itself. See Apple's documentation on creating distribution-signed code for the certificate and signing options that fit your app.
Submit to Apple and wait for the result
Send the signed app in a ZIP archive, a disk image or a signed installer package to Apple's notary service with xcrun notarytool submit. Use --wait to wait for the result. See Apple's documentation on customizing the notarization workflow for authentication options. If Apple rejects the submission, read the notary log, correct the reported issues and submit again.
Staple the ticket and check the app
When Apple accepts the submission, use xcrun stapler staple to attach the ticket to the disk image or installer you will distribute. If you submitted a ZIP, staple the app itself and make a new ZIP for distribution. Use spctl to check Gatekeeper's assessment of the app. See Apple's documentation on notarization issues for the verification options.
Save the release and close the lease
Copy the files you need off the rented Mac before the lease ends. Remove any API key files or saved notary credentials you used on the machine, and revoke the dedicated API key from a computer you control. NVTO deletes the virtual machine at lease end.