We went out on two campaigns with the Messenger of Allah ﷺ during the month of Ramadan, the day of Badr and the conquest (of Makkah), and we broke the fast in both cases.
أَنَّهُ قَالَ غَزَوْنَا مَعَ رَسُولِ اللهِ ﷺ غَزْوَتَيْنِ فِي شَهْرِ رَمَضَانَ يَوْمَ بَدْرٍ وَيَوْمَ الْفَتْحِ فَأَفْطَرْنَا فِيهِمَا