You can build .NET 8.0 RC2 from the repository by cloning the release tag v8.0.0-rc.2.23479.6
and following the build instructions in the main README.md.
Alternatively, you can build from the sources attached to this release directly.
More information on this process can be found in the dotnet/dotnet repository.