In my case, the problem was related to accepting Apple's terms on the page https://developer.apple.com/account, after accepting I was able to publish normally.