Over £5 million of National Lottery funding awarded to community groups across Wales.