diff --git a/.changeset/fresh-rockets-yell.md b/.changeset/fresh-rockets-yell.md new file mode 100644 index 0000000000..b8f597206e --- /dev/null +++ b/.changeset/fresh-rockets-yell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +The `publish:file` action has been deprecated in favor of testing templates using the template editor instead. Note that this action is not and was never been installed by default. diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index de9a9e677f..7c24bdc572 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -303,7 +303,7 @@ export function createPublishBitbucketServerAction(options: { token?: string | undefined; }>; -// @public +// @public @deprecated export function createPublishFileAction(): TemplateAction<{ path: string; }>; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts index 2d2cb85930..52376e39a3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts @@ -29,6 +29,7 @@ import { createTemplateAction } from '../../createTemplateAction'; * production, as it writes the files to the local filesystem of the scaffolder. * * @public + * @deprecated This action will be removed, prefer testing templates using the template editor instead. */ export function createPublishFileAction() { return createTemplateAction<{ path: string }>({ @@ -47,6 +48,10 @@ export function createPublishFileAction() { }, }, async handler(ctx) { + ctx.logger.warn( + '[DEPRECATED] This action will be removed, prefer testing templates using the template editor instead.', + ); + const { path } = ctx.input; const exists = await fs.pathExists(path);