Creating “Release Build” Command Using Task Configuration

I want to create a command in an extension called “Export Release Build” that utilizes the configuration of the current Task. However, I’m not sure if I can get the configs from the TaskProvider or if I can trigger the TaskProvider with additional options. Anyone have ideas?