Bhagavad Gita 9.28

शुभाशुभफलैरेवं मोक्ष्यसे कर्मबन्धनै: |
सन्तयोगयुक्तात्मा विमुक्तो मामुपैष्यसि

Translation

By dedicating all your works to Me, you will be freed from the bondage of good and bad results. With your mind attached to Me through renunciation, you will be liberated and will reach Me.