It will break Sanctuary
The latest Errata update changes the specific wording for Sanctuary
If the warded creature makes an attack, casts a spell that affects an enemy, or deals damage to another creature, this spell ends.
Attacking an object is included under creature makes an attack, so this now officially breaks Sanctuary.
Theory is also supported by the now unofficial tweets by Jeremy Crawford
There have been several instances where Crawford has talked about Sanctuary, each ending with the statement that there are RAW loopholes, but that RAI is that if you deal damage, it ends Sanctuary.
That suggests that the idea of Sanctuary is that you are foregoing dealing damage to gain protection. If you choose to deal damage (to anything), you lose the protection.
Therefore, RAW may allow it, but the intent behind the spell is "If you want to get protection, then don't deal damage." Whether or not WOTC makes an errata on this remains to be seen. And if you see above...they did! Problem solved from both earlier intent and now official errata.
Spirit Guardians and Sanctuary
RAI: A damaging activity ends the spell
Witch Bolt and Sanctuary
witch bolt's damage ends sanctuary
Grappling/Shoving and Sanctuary
Grappling/shoving an enemy does end the sanctuary spell on you, since you have made an attack.