fix build flags and envs
Hi! Thank you for maintaining this and many other packages - your work is priceless.
I found an issue with CLI version defaulting to 0.0.0, which causes warnings because the CLI tries to match its own version with the one provided in the config. It turns out that the environment variable for the version should be set during the build.
Additionally, I noticed that not using --all-features reduces the binary size by about 2 MB, and I don’t think running tests requires it either. For these points, I referred to the release workflows.