It's an Automator action from Armin Beigel called "Create Disk Images From Files." Once you download the script and unpack the zip file, all you need to do is launch Automator on your Mac then import the action and drag it into the Automator workflow area. Select Google Drive as the folder in the options settings by browsing to the folder in Finder. To make this a password-protected file in Google Drive, click the checkboxes to compress and encrypt the image. Then in the file menu, save the application to your desktop (I named my shortcut "Encrypt File on Google Drive").

Now every time you drag a file to that shortcut, you'll be prompted for a password and the file will be encrypted and saved to your Google Drive folder on Google. Neat, right?

Below is the Macworld article with more information and the download link.