task(context, task) {
					let hasError = false;

					return from(runPublish(getPublishCommand(options)))
						.pipe(
							catchError(error => handleNpmError(error, task, otp => {
								context.otp = otp;

								return runPublish(getPublishCommand({...options, otp}));
							})),
						)
						.pipe(
							catchError(async error => {
								hasError = true;
								await rollback();
								throw new Error(`Error publishing package:\n${error.message}\n\nThe project was rolled back to its previous state.`);
							}),
							finalize(() => {
								publishStatus = hasError ? 'FAILED' : 'SUCCESS';
							}),
						);
				}
@type {(context, task) => Listr.ListrTaskResult<any>}