Publishing document using custom workflow

You have to do it in the workflow setting for specific List library from Document Library Settings under settings tab. Then you have to do the same thing similar to custom workflow for page. Here, only the difference is that there is no initial workflow for the custom document list. In our example is Instruction guide.

Then do the same steps for creating workflow from the previous solution (Sharepoint: Creating custom Workflow to approve page or document (Part 1 of 2)) and just configure the option according to the screen-shot.