General Motors will end production of its Chevrolet Malibu car later this year to produce new electric vehicles.