An ALMA survey of the SCUBA-2 cosmology legacy survey UKIDSS/UDS field: dust attenuation in high-redshift Lyman-break galaxies