It lies in the ‘why’ (Acts 5:1-16)
Here we have two contrasting examples of why we do the things we do. Barnabas gave, served, and sacrificed for the early church, and was commended for it. Ananias and his wife Sapphira gave, but were judged and lost their lives. What was the difference? It lied in the 'why'.
We must bring focus to why we follow Jesus, why we give, and why we do the things we do within the church. If it's for our own glory, we've acted on the influence of the enemy, sinned and grieved the Holy Spirit. If all we do is for the glory of God, then we're in the right place.