If someone says, "Oh Allah, I make a promise to you that will not do such and such action", and despite of this, he still does that action, will expiation (Kafara) be incumbent upon him?
The words mentioned in the question "Oh Allah, I make a promise to you that will not do such and such action" are not words that constitute an oath. Thus, doing that action would not cause expiation (Kaffara) to be incumbent. However, he would be sinful for doing this action after using the name of Allah to prohibit himself from doing it. For this reason, the person in question must repent, seek Allah's forgiveness and refrain from doing such in future.
And Allah knows best.