We wrote a script to automate the extension signing process so that we could integrate it in our build pipeline and @jiminybillybob told me that it could prove useful to other developers so we put it on Github.
The simplest way to use it is to provide the path to the extension. The script will then prompt the user for Extension Warehouse credentials.
sign.ts <path to the extension folder>
To avoid interrupting the script, you can also specify the credentials from the start via the command-line.
sign.ts <path to the extension folder> --username <your username> --password <your password>
Alternatively, you can store the credentials in environment variables.
sign.ts <path to the extension folder> --env
There’s a bit more documentation on the Github page.