Walking upstairs help

Hello, i’m trying to make smooth animation when walking upstairs, and i’m curious what would be the best way to achieve that? I searched for some kind of tutorial or just topic on walking on stairs and didn’t find anything useful.
Right now i have foot and pelvis IK so it places body on correct height. Walking downstairs is good, but upstairs it slides on ground, doesn’t pull knees up.
Do i have to make a animation stricte for walking upstairs and check in game when on stairs to switch to this animation? Or is there a way to do it with IK?