How can I release an invoice automatically?

In the Billing section of your contract select the Released option from the Generated Invoice Status drop-down list. When you generate invoices for the contract, the invoices are created in Released status.