Pay dirt

A profitable or useful discovery or venture, dirt in which much gold is found.

The company hit pay dirt when they published the new computer software.