In his letter to the Christians in Rome, the Apostle Paul wrote (Rom 2:6-8),

God will render to each person according to his deeds: to those who by perseverance in doing good seek for glory and honor and immortality, eternal life; but to those who are selfishly ambitious and do not obey the truth, but obey unrighteousness, vengeance and indignation.

And commenting on these words, Abiel Abbot Livermore aptly remarked (bold mine), 

The grand principle is here announced of the impartiality of God’s awards, as made with single reference to life and character. The theological issues which have been got up relative to faith and good works, as to which is the criterion of acceptance, are irrelevant. Character is the test - character of course having a root in faith, or in other words in a deep, inward principle of spiritual truth, and blooming outwardly by a necessary force of life in the flowers and fruits of beautiful and useful good works. If it be possible to state any doctrine in human language so that it cannot be mistaken or misrepresented, the doctrine of a righteous moral retribution is so stated in this passage. As men live, so will they be judged here and hereafter - live inwardly, in motive, will, desire, and intention, as well as outwardly, in act, speech, and habit. The Gospel does not alter the native grounds of acceptance with God, as the Apostle announces here, except as greater privileges establish a greater trust to be accounted for and provide more animating and effectual motives to obedience.