Refactor package name derivation logic in main function
This commit enhances the package name derivation process by introducing a new variable, derived_package_name, which is used to construct the package name for subfolder builds. The logic now checks for an existing package name argument and derives the name from the root project name and subfolder name if not provided. This change improves clarity and consistency in how package names are handled during version resolution and publishing.