I don't really have an opinion about the specific HTTP response codes that are returned; I trust your judgement if you think that's the appropriate response.
I just think there should be a body. Nobody likes staring at a screen with no information, unsure if anything is really going on. On GitHub, it's common to set up actions which run and check every commit, and it's reasonable to think people might want that to happen on publishing too:

So when I publish a package, either through the SwiftPM CLI or some kind of Xcode interface, I would not want to see:
swift package publish <...>
Processing...
For 5/10/15 minutes. Rather, I would prefer to see something like:
swift package publish <...>
Stage 2: Running configured actions
â
Swift package tests (macOS)
â
Swift package tests (Linux)
đ Swift package tests (Windows) (Running)
đ Generate documentation (Waiting)
âšī¸ More information available at: https://....
Where that set of jobs and "more info" link is returned by the server at each async status request.
Similarly, when publishing fails, I would like to see which of these jobs failed, optionally with a link to get more information, if the server supports it:
swift package publish <...>
Stage 2: Running configured actions
â
Swift package tests (macOS)
â
Swift package tests (Linux)
â Swift package tests (Windows) (Failed)
âŦī¸ Generate documentation (Canceled)
â Publishing failed. More information available at: https://....
Again, this would all be optional. If you have a very basic package repository which doesn't run any checks or isn't able to report their status, you can return nothing and get the basic "Processing..." text.