Gamma-ray bursts from quark stars