Yes,Post 2020 errata: RAW it appears you stilldo not attack. RAW and narrative justification., the attack is part of the "effect" of the magic
See https://media.wizards.com/2020/dnd/downloads/SCAG-Errata.pdf - the "as part of the action used to cast this spell" wording is gone, and with it the main justification for treating the attack as a component, not an effect of the magic (despite where it was placed in the spell description).
You brandish the weapon used in the spell’s casting and make a melee attack with it against one creature within 5 feet of you. On a hit, the target suffers the weapon attack’s normal effects and then becomes sheathed in booming energy until the start of your next turn. . If the target willingly moves 5 feet or more before then, the target takes 1d8 thunder damage, and the spell ends.
... extra damage with levels
(And same first sentence for Green Flame Blade.)
(Not "within range"? So Spell Sniper won't let you benefit from a Reach weapon with it? Notice that range is now "self" (5ft radius), so clearly another intentional change.)
The fact that an erratum specifically changed "as part of the action..." to this more standard phrasing lends additional weight to the interpretation that the design intent is for Counterspell to cancel all of it, including the attack. Even moreso than if it had been phrased this way the entire time.
It now reads more like the attack itself is a result of the magic. Or happens after the casting (weapon used, past tense), not "as part of", in a way that the caster for some reason wouldn't carry through if the magic were disrupted, apparently... You could still make the argument that the attack itself isn't magic and that you'd still do it even if the magic were disrupted, but this is a significantly weaker argument.
The attack's regular effect doesn't include making the weapon or the damage count as magical for overcoming resistance or anything like that, so it's easy to argue the attack still isn't powered by the magic, for whatever that's worth. It's still a delivery mechanism for the magic. But it does look like we're meant to interpret it as an effect.
Old wording: Yes, you still attack. RAW and narrative justification.
This section is now obsolete, and was written based on the older wording, which provided most of the justification for treating this as an exception to the usual norm of the description text being all effect:
As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell's range, otherwise the spell fails. ...
You are of course free to choose how these cantrips work at your table, but the "attack still happens" ruling is much harder to justify as RAW, post 2020. The rest of this answer was written before I was aware of the errata to Green Flame / Booming Blade, based on the original wording (which I think is neat, and an interesting difference from the way other spells work, but unfortunately isn't how the designers wanted them to.)