I couldn’t find any good automated solutions for this, so I created one!
This plugin is super simple: all it does is to create a local git tag after you run a deploy, using the version of the deployed function as the tag name. That way, you’ll always be able to correlate the versions of your local source code and deployed artifacts.