[CI] Optimize release stages logic

Summary

As a follow-up to !186 (comment 654489972), let's optimize the release stages logic. As of that MR, we do:

releases:
- prepare
- build
- test
- publish

However, this is not the order in which the associated jobs actually happen. They were arranged this way to avoid confusion in case it appeared that we did not test before publishing, when in reality we actually don't run tests for tag pipelines.

Acceptance criteria

  • Ordering of the stages entries is established - should stages be joined based on what "goes together" logically, or should stages be ordered according to the sequence in which they occur?
  • Stages are modified if needed based on the decision above
Edited by Mitchell Nielsen