Apple has deprecated altool which is used to sign programs so that they can be run on other people’s computers. They are signed with a developer’s key and “virus checked”.
Instead of using altool it will soon become necessary to use notarytool. Switching from altool to notarytool is simple. If you have used this before:
xcrun altool --notarize-app --primary-bundle-id com.your.app --username firstname.lastname@example.org --password yourpassword --file YourFile.dmg
You can now just use this command
xcrun notarytool submit YourFile.dmg --apple-id email@example.com --team-id YOURTEAMID --password yourpassword --wait
There is also a way to save the password in a keychain profile using the “store-credentials” command. However the build script cannot access the keychain profile while the device is locked, i.e. you could only run the build script while using the computer.