This paper describes in detail a novel manufacturing process for optical gratings suitable for use in the UV and soft X-ray regimes in a single-crystal diamond substrate based on highly focused swift heavy-ion irradiation. This type of grating is extensively used in light source facilities such as synchrotrons or free electron lasers, with ever-increasing demands in terms of thermal loads, depending on beamline operational parameters and architecture. The process proposed in this paper may be a future alternative to current manufacturing techniques, providing the advantage of being applicable to single-crystal diamond substrates, with their unique properties in terms of heat conductivity and radiation hardness. The paper summarizes the physical principle used for the grating patterns produced by swift heavy-ion irradiation and provides full details for the manufacturing process for a specific grating configuration, inspired in one of the beamlines at the ALBA synchrotron light source, while stressing the most challenging points for a potential implementation. Preliminary proof-of-concept experimental results are presented, showing the practical implementation of the methodology proposed herein.