There is no such thing as a "debug version" and a "release version" in Code::Blocks.
It's just that these flipping stupid wizards generate a "debug" and a "release" target to make all the Visual Studio users who are unable to think outside the braindead Visual Studio scheme happy.
What you have in Code::Blocks is build targets, these can be anything, any valid collection of options, paths, defines, and source files.
If you turn on optimisations and turn off debug symbols, and define NDEBUG for a target, then you have what you would call a "release version". If you then call this target "release", it looks like in Visual Studio, too. But that is not the only possible thing, and it is not how it has to be, necessarily.
To address your problem and build your "release" target, you have two options:
1. Select "release" from the build target combo box in the toolbar. This will build only "release"
2. Open project options, and make a virtual build target (you can choose any name you want, but for example "All" or "Everything" would be fit) , then add "debug" and "release" to that virtual build target. Close Project options, and select "All" from the build target menu in the toolbar. Now, this will build both "debug" and "release" in one go. (hint: make sure you have distinct output executable names, or the latter will overwrite the former).