On Friday night, Brett Gardner looked like the kid who wasn’t invited to the class party. While his teammates feasted on Orioles pitching, he continued his fast: no home runs this year, and no RBIs either. All dressed up and nowhere to go, with May peeking right around the corner.

Turns out, his invite just got lost in the mail.

Gardner hit two of the Yankees’ four home runs and drove in four runs in the first two innings Saturday, leading them to a 12-4 win over the Orioles at Yankee Stadium. The promotional calendar said the Yankees were giving away tote bags this weekend, but it might just as well have said they were giving away home run balls. The Yankees have launched nine in the past two games, three by Aaron Judge, who hit his 10th of the season Saturday, tying the major-league rookie record for April homers.

No. 9 hitter Austin Romine hit a two-run homer, a two-run single and a sacrifice fly in a five-RBI day.

After Saturday’s light show and Friday night’s effort — in which they came back from an eight-run deficit to win in 10 innings, 14-11 — the Yankees have scored 26 runs against the Orioles, who might not be looking forward to the encore on Sunday afternoon.

It was the fourth victory in a row and 14th in 17 games for the Yankees (15-7), who have the best record in baseball. They lead the American League with 124 runs and 36 home runs.

advertisement | advertise on newsday

“You’re never sure when it’s going to come from, and that’s good,” Joe Girardi said. “Everyone seems to [think], ‘It doesn’t matter where I hit, I have a job to do. I’m going to do my job. If my job is to get on, I’m going to get on. If I’m supposed to drive in runs, it doesn’t matter where I’m at.’ They’ve all contributed, and that’s the great thing about our lineup.”

It helps when you start the day with a second consecutive home run. Well, kind of.

After Matt Holliday’s walk-off three-run homer in the 10th on Friday night, Gardner got yesterday’s game started on Ubaldo Jimenez’s second pitch of the game — sending a drive into the second deck in rightfield for the Yankees’ first leadoff homer of the year and seventh of his career.

Gardner added his second one an inning later. Jimenez, who allowed a one-out single to Didi Gregorius and walked Judge and Greg Bird to load the bases, gave up a sacrifice fly to Romine. That brought up Gardner, whose drive landed in the centerfield side of the Yankees’ bullpen for a 5-0 lead.

“It’s a little bit of a relief,” said Gardner, who entered the game with a .188/.316/.234 slash line. “I’ve been struggling a little bit swinging the bat. It was nice to be able to contribute on the offensive side of the ball . . . We’re at the end of April and I don’t have a homer or an RBI, so it felt good to give Big Mike the lead.”

Yankees videos

Speaking of Michael Pineda (3-1), who allowed no earned runs and struck out eight in 5 1⁄3 innings, the Orioles didn’t get to him until the sixth. Manny Machado led off with a double and scored on an error by Chase Headley, and Adam Warren’s wild pitch brought home the second run.

It drew the Orioles within 7-2, but it was hardly cause for concern. In the bottom of the sixth, Vidal Nuño issued a leadoff walk to Judge, and one out later, Romine’s two-run homer over the scoreboard in leftfield put the Yankees back up by seven.

After a two-out RBI double by Gregorius in the seventh, Judge — who was 2-for-2 with two walks and four runs scored — hit a two-run homer into the seats above the Yankees’ bullpen for a 12-2 lead. He has driven in 20 runs and scored 22 in his 21 games.

“Guys are really doing a great job of extending at bats, having quality at bats, finding ways to get on base and keeping the line moving,” Gardner said. “It was an all-around good day for us . . . It’s going to be hard to find days where one through nine contributes.”

The way the Yankees are playing right now, they’re not making it seem that hard at all.