This is recommended in the CHAOSS Sunset Practitioner Guide. We would like to add a step to this in the workflow:
Taking the additional step of adding your code to the Software Heritage archive can help preserve it over time. This is especially true if you are self-hosting your source code repositories, but it can also help archived code outlive potential platform changes and make it easier for people to find in the future.