ci: Fix extraction of version number
For tags containing numbers which don't belong to the version number, the version number was extracted not correctly. This occured e.g. for tags like 'rel_stm32mp_1.2.3-test' where the extracted version was '32mp_1.2.3-test'