Immanuel Kant said this quote

Settle, for sure and universally, what conduct will promote the happiness of a rational being.