I have an F# project that I build this way:
dotnet publish --nologo -r osx-x64 -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimm