Wholesale price increases slowed in June to a 0.2 percent pace, the government said yesterday. Economists saw the report as fresh evidence that inflation is likely to stay tame through most of the year.

The slight rise in the Labor Department's producer price index -- equivalent to an annual rate of 2.9 percent inflation -- was due mostly to higher energy prices.

Still, for the first half of 1987, wholesale prices climbed at an annual rate of 4.5 percent -- moderate by the double-digit standards of the late 1970s and early 1980s, but still the briskest six-month clip in five years.

Producer prices, one stop short of the retail level, fell 2.5 percent in 1986.

The June increase followed rises of 0.3 percent in May and 0.7 percent in April and was the best performance since a 0.1 percent increase in February.

"It shows that a lot of the earlier concern over the rate of inflation was overblown," said Christopher Caton, director of forecasting at Data Resources Inc. in Lexington, Mass.

However, Caton said the modest June increase "is too good to last, just as April's 0.7 percent increase was too bad to last. I think we're now looking at {an annual rate of} 4 to 4.5 percent for the rest of the year."

At the White House, spokesman Marlin Fitzwater called the June figures "good news, indicating that the economy's underlying inflation rate is not accelerating.

"It's a very good omen to see a pattern of continued low inflation with solid economic growth," Fitzwater said.

Food prices moderated and rose 0.5 percent after increases of 1.4 percent and 1.5 percent, respectively, in May and April.

Although vegetable prices jumped a seasonally adjusted 17.9 percent, poultry prices fell 6.2 percent and cost increases slowed for beef, pork, veal and fish.

But gasoline prices rebounded in June by 3 percent, reversing the 1.1 percent decline the month before.

Heating oil was up 4.6 percent; natural gas declined 1.8 percent.

Lawerence Chimerine, president of Wharton Economics, said that while these gasoline price increases are sure to be reflected in higher prices at the pump in the consumer price index, they should soon level off.

He said he doubted that crude oil prices would go much above their current range of $20 to $21 a barrel.

"The increase in inflation will be very modest for the rest of this year and into next year," he said. Still, he said that even with inflation in the 4 percent to 4.5 percent range, "this is above the wage increases that many people are getting. This can lead to a stagnant economy."

After falling during most of 1986, energy prices surged at an annual rate of 57.6 percent in the first three months of 1987, then slowed to a rate of 12.4 percent from April through June.

For June, subtracting the effects of volatile energy and food prices, the inflation index rose 0.1 percent in June after falling 0.2 percent in May.

Wholesale prices, as a rule, show more swings from month to month than do consumer prices -- which appear to be leveling off for the year at just under 5 percent after gaining 1.1 percent in 1986.

The government will release its consumer price index for June on July 22