diff --git a/build/preview-comment/index.js b/build/preview-comment/index.js index b381e030..543b2abc 100644 --- a/build/preview-comment/index.js +++ b/build/preview-comment/index.js @@ -20780,6 +20780,7 @@ function commentInput() { } executeAction(commentAction); async function commentAction(input = commentInput()) { + (0,core.warning)('Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378'); const project = await projectInfo(input.project); if (!project.owner) { project.owner = await projectOwner(); diff --git a/preview-comment/README.md b/preview-comment/README.md index 1ad3052f..0ed00794 100644 --- a/preview-comment/README.md +++ b/preview-comment/README.md @@ -32,6 +32,8 @@
+> Expo publish is deprecated, but will be supported until 2024. ([read more](https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378)) + ## What's inside? This (sub)action allows you to comment on pull requests containing Expo QR codes. diff --git a/src/actions/preview-comment.ts b/src/actions/preview-comment.ts index 8a504337..ce729c41 100644 --- a/src/actions/preview-comment.ts +++ b/src/actions/preview-comment.ts @@ -1,4 +1,4 @@ -import { getBooleanInput, getInput, setOutput, info } from '@actions/core'; +import { getBooleanInput, getInput, setOutput, info, warning } from '@actions/core'; import { projectDeepLink, projectInfo, projectLink, projectOwner, projectQR } from '../expo'; import { createIssueComment, pullContext } from '../github'; @@ -26,6 +26,10 @@ export function commentInput() { executeAction(commentAction); export async function commentAction(input = commentInput()) { + warning( + 'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378' + ); + const project = await projectInfo(input.project); if (!project.owner) { project.owner = await projectOwner(); diff --git a/tests/actions/preview-comment.test.ts b/tests/actions/preview-comment.test.ts index 354f2649..808209c1 100644 --- a/tests/actions/preview-comment.test.ts +++ b/tests/actions/preview-comment.test.ts @@ -63,6 +63,13 @@ describe(commentAction, () => { jest.mocked(expo.projectOwner).mockResolvedValue('fakeuser'); }); + it('warns users for deprecated publish', async () => { + await commentAction({ ...input }); + expect(core.warning).toBeCalledWith( + 'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378' + ); + }); + it('resolves project info by project path', async () => { await commentAction({ ...input, project: 'fake/path' }); expect(expo.projectInfo).toBeCalledWith('fake/path');