Yes, we should.
Let your light shine before men in such a way that they may see your good works, and glorify your Father who is in heaven.
Matthew 5:16 NASB
Keep your behavior excellent among the Gentiles, so that in the thing in which they slander you as evildoers, they may because of your good deeds, as they observe them, glorify God in the day of visitation.
1 Peter 2:12 NASB
No, we should not.
1 Beware of practicing your righteousness before men to be noticed by them; otherwise you have no reward with your Father who is in heaven.
2 So when you give to the poor, do not sound a trumpet before you, as the hypocrites do in the synagogues and in the streets, so that they may be honored by men. Truly I say to you, they have their reward in full.
Matthew 6:1-2 NASB
3 but do not do according to their deeds … ; for they say things and do not do them.
4They tie up heavy burdens and lay them on men’s shoulders, but they themselves are unwilling to move them with so much as a finger.
5 But they do all their deeds to be noticed by men;
Matthew 23:3, 4-5 NASB
Intro
Is there a contradiction concerning behavior and good works? Should we do them in the dark? So that nobody may see them? Or should we show them as a sort of propaganda for the faith? What was Jesus teaching about the subject?
Apples and pears
When we look at the four texts of the critic with which he creates his contradiction, we have to observe the differences between the issues he combines:
1. He deals with good deeds, works (Matthew 5:16, 1 Peter 2:12) … as being the same as bad deeds, works (Matthew 6:1-2, 23:3, 4-5).
2. Good works are qualified as living a good life. Evidence: a righteous life of the followers of Jesus (Matthew 5:16, 1 Peter 2:12). Bad works are qualified as hypocritical; saying but not doing (Matthew 6:1-2, 23:3, 4-5).
So the critic is comparing apples and pears, blaming them to be different. Conclusion:
No Bible Contradiction
Right intentions
Why did Jesus—and later Peter—say that the Christians should show their good works? To make them familiar with the rule: “For nothing is hidden, except to be revealed.” (Marc 4:22) In the Kingdom of God we cannot remain hidden nor our works. Jesus did not try to introduce a new law. Do good and the people and God will love you, or so. No, it was certainly the intention to live a new life in Christ and doing all things in its joy and acting according the intrinsic quality of things. To help, as it is necessary. To protect, if there is no protection. To serve as a little support can mean a lot. To act socially as we are social creatures. To act with responsibility being mature.
We should not do good things only because Jesus said so, but also because they are good to do.