Apple has deprecated its original method of notarizing applications, altool, and, probably in 2023, will require developers to use notarytool instead. Until the developers of the superb SD Notary tool update it to use notarytool instead of altool, you can use this NotarizeApp AppleScript app to automate the process of using notarytool. You do not need this app, because SD Notary gets the job done and has far more options for customizing the process.
The app has "Distrib" in its name in order to remind me (and you) that it needs to be edited by individual users before being used. Feel free to rename it or leave it with its current name.
To use the app, first open it Script Editor or Script Debugger and very carefully read and follow the instructions at the top of the script. You will need to enter a few commands in a macOS terminal; one of them is a command that creates a profile that identifies yourself to Apple when uploading an app for notarizing. The instructions at the top of the script are all you will need. A lengthier explanation (which I relied on when writing the app) may be found here.
I used another copy of the app (with my profiile information included) to notarize this copy of the app.
For reasons that I don't understand, the app sometimes - not often - fails to notarize an app that I can successfully notarize with SD Notary. Most of the time, however, it works perfectly.
Edward Mendelson (em thirty-six [at] columbia [dot] edu, but with two initials and two numerals before the [at] sign, not spelled out as shown here).