We (Data Management Support) have worked with the Swedish National Data Service in collecting best practice and developing advice for publishing research software openly. Here you can find guidance on where to publish, how to select a license, and how to make your software comprehensible, reusable and citeable. You can read about what to keep in mind when writing code as well as how to prepare it for publication.