This template creates multiple versions of the same state machine and publishes a version using the latest revision of a state machine.

CloudFormation Template