As akton notes, the general rule is you don't quit until you have a new job.
Now, this isn't hard and fast - sometimes you want to go travelling, or you just want some time off, or maybe the work environment is super toxic - you'll know when that's the case.
But your question is more about the "morality" of getting the money and skedaddling, and the timing of it too.
I'm here to tell you that there is nothing immoral, wrong, or even illegal about getting more money and then leaving. Your CEO is a businessman, and they knows this is true, and it is what they would do. (Using they for "he or she" - i would have preferred "shem" myself)
As for timing:
Getting a raise and then looking for a new job is really the best way to do it - you can now negotiate a higher level of salary at some other place based on your now higher "current" (ie post-raise) salary.
Also, you earnt that bonus, that's why they're giving it to you. Maybe their bonus comes with a "you don't get this if you're not here for another year" tag - but that's what a new company's sign-on bonus is all about! You get that bonus, and then you can negotiate a sign-on bonus to match it! ALSO, you can get in writing that the new company will guarantee you the same amount bonus for the first year you work with them.
I hope you're beginning to see that waiting for the bonus and raise is really the "best" way (from a monetizing standpoint) to time your job hunt.
Finally, in your year-end review, there is nothing wrong with saying you don't like the work you are doing, can you do XYZ work instead. This is always a good idea if the company has XYZ work, because they may well shift you to it. It can also signal that you are unhappy up the chain of command too, which might lead them to re-actively offer you "stuff" to keep happy.
Super-Final-Word: I've never heard of the company that is happy with an employee firing them after the employee says that they do not like the work they are doing. Finding good people is hard, there are whole websites dedicated to that task.