Both are correct, but it may depend on the context of your paragraph.
If I asked, "What were you doing yesterday?" Then you would answer, "I was studying all day yesterday."
But if I asked, "What did you do yesterday?" Then you would answer, "I studied all day yesterday."
The difference is the tense of the verb, what "you were doing" versus "what you did". What were you doing? I was doing _____. What did you do? I did ______.