How can I generate a sinusoidal voltage and current waveform using half-bridge or full bridge inverter?
Well what you are talking about with the duty cycle is similar to the way Class-D audio amplifiers work. But just to clarify, even though the amplified frequency might be only 60 Hz, the square wave (whose duty cycle is being modified) might be over 100Khz. As a result, a tiny amount of capacitance inductance (usually in the speaker itself, in the case of an amplifier) turns the output into a very nice sine wave. A similar strategy I've seen developed for power inverters involves a digital control system or MCU that over the span of a 60 hz cycle time, reads a series of 1's and 0s from a lookup table from memory. Again, the number of lookups must be much greater then the cycle time, but in this case maybe only 100 divisions will yield excellent results. The sequence stored in memory, in that case, are called "magic numbers", and I first saw this methodology developed by Don Lancaster, who used to write for some electronics magazines... wow.. I think like 4 decades ago? But he still runs a web site called http://www.tinaja.com, or you can look up Don Lancaster in a google search, with the string "magic numbers". He probably has all the magic number data available and pre-calculated, though I'm sure he will want some kind of fee.

The other option is to just "approximate" a sine wave. Many home "UPS" systems will switch between a few taps on the output transformer, to provide a few "steps" along what would otherwise be a square wave. Though the steps are still not as pretty as a sine wave on a scope, they still have a much lower harmonic content than a straight up square wave, and so are much kinder to equipment that is powered from the circuit.

Hope some of this helps.