NFHS rule 9 Section 6 Article 6
Winning and losing pitchers are determined as follows.
(A): If the starting pitcher has pitched the first four innings or more and his team is ahead when he is replaced and the team holds the lead for the remainder of the game, He shall be the winning pitcher.
In your situation the starter needed one more inning to get the win, unfortunatly he only gets the no decision. The reliever gets the win.
If the game had ended in less than 7 innings your starter would have qualified for the win under section (B)