The way GitHub tends to be used is you'll have your entire project within a self-contained git repository so all you need to do when getting started on a new computer is
$ git clone https://github.com/Michael-F-Bryan/include_dir
$ cd include_dir
$ cargo build
So don't necessarily think of it as a place for "publishing". It's more like a single place to manage your project's evolution over time and facilitate collaboration. A single repository might contain multiple crates.
On the other hand, crates.io is a package manager where you'll upload "official" releases for a particular version of your crate.
To explain why most software companies or open-source projects use some form of version control system (git) and hosting service (GitHub), it might be helpful to look at an example.
At a previous company, they'd had the same one software developer for about 18 years and his system was to keep all source code on a network drive. Then whenever he made a new release, he would zip up the entire folder and put it in a separate "archive" folder.
This workflow was perfectly fine when it was just him, but became a complete clusterf*ck when I joined the company because we would constantly step on each other's toes.
Imagine are hacking away in main.rs
and I hit save after making some changes in database.rs
, so now the project is broken because two people have added unfinished features to the project. We either need to coordinate who makes changes and when, or (what happened in practice) one person never works on that project. There was also no way to see what changes had been made between versions or roll back other than opening the backup archives and comparing the code by eye.
It was painful. 10/10 would not recommend.
Git fixes this problem by making all changes atomic ("commits") and letting you work in your own version of the project ("branches") until you are ready to merge it into the "master" copy.
GitHub builds on git by providing auxilliary tools for managing your workflow. It gives you a central place to store your repositories, you get a built-in issue tracker, you can browse code without needing to download it locally, you can create "pull requests" when merging someone's work in to make reviewing changes easier (using the diff view) and you can write comments that point at specific lines. You can also wire things up so it'll automatically build and test your project when you push code, immediately alerting you when you break the project.
Tags and Releases are just an easy way to say "when I say version 1.2.3, I'm talking about the project at exactly this point". You can use them to correlate a particular release on crates.io with the rest of the project.
TL;DR: Like Rust, Git and GitHub have a certain learning curve, but once you get past that it's a massive quality-of-life improvement. Especially when there is more than one person involved.