Retail sales rose 0.4% in July, let by higher auto and gasoline sales, the Commerce Department said Friday.