how to upgrade Xcode 9 to Xcode 10.1 in mac OS Sierra 10.12.6 (16G1815)

I’ve an olden days MacBook early 2011 and I can’t be able to upgrade my operating system more than mac os Sierra 10.12.6 (16G1815) on it. But I am working in Xcode and in my current project I needs to input auto renewable subscription functionality but discount features such as free trail period, pay as you go, and pay upfront are linked in introductory pricing api class. which is available in Xcode 10 and I really needs to install it on my mac because iOS 12 and greater requires this feature in auto renewable subscription modules in order to approve app from iTunes App Store team. So anyone could help me install Xcode 10.1 or even Xcode 10 on my mac OS Sierra 10.12.6 (16G1815)??? any idea???? please help me.