refactor Publish to PublishSettings