According to this story, a few months ago the South Carolina Republican Party revised its declaration of candidacy form to require candidates in its presidential primary to promise they will support the party’s nominee in November, no matter who it turns out to be.
In 2012, when there was no such pledge in South Carolina’s Republican Party, Gary Johnson ran in the South Carolina Republican primary but he abandoned that campaign and was on the November 2012 South Carolina ballot as the Libertarian nominee.