Explain me the meaning of a sentence
I have a passage from a novel:
"Yes! I decided it was a trap. They were taping everything I did in order to set me up and track down the source of cocaine in the section. I wouldn’t fall for it though; I would simply say that I couldn’t find any. I knocked on the door and the governor opened it immediately".
I can't understand this piece: "They were taping everything I did in order to set me up".
Thanks for helping in advance.