与你的团队分享预览

通过在分支上发布更新与你的团队共享应用预览。


在分支上做出更改后,你可以通过发布更新与你的团队共享这些更改。这允许你在审核期间获得有关更改的反馈。

¥Once you've made changes on a branch, you can share them with your team by publishing an update. This allows you to get feedback on your changes during review.

以下步骤概述了发布更改预览并与团队共享的基本流程。如需更全面的资源,请参阅 预览更新 指南。

¥The following steps will outline a basic flow for publishing a preview of your changes, and then sharing it with your team. For a more comprehensive resource, see the Preview updates guide.

发布更改预览

¥Publish a preview of your changes

你可以通过运行以下 EAS 命令行接口 命令来发布当前更改的预览:

¥You can publish a preview of your current changes by running the following EAS CLI command:

Terminal
eas update --auto

此命令将在当前分支名称下发布更新。

¥This command will publish an update under the current branch name.

与你的团队共享

¥Share with your team

发布预览后,你将在终端窗口中看到如下输出:

¥Once the preview is published, you'll see output like this in the terminal window:

Terminal
✔ Published!
...EAS Dashboard https://expo.dev/accounts/your-account/projects/your-project/updates/708b05d8-9bcf-4212-a052-ce40583b04fd

与审阅者共享 EAS 仪表板链接。打开链接后,他们可以单击预览按钮。他们将看到一个二维码,可以扫描该二维码在其设备上打开预览。

¥Share the EAS dashboard link with a reviewer. After opening the link, they can click on the Preview button. They will see a QR code that they can scan to open the preview on their device.

自动创建预览

¥Create previews automatically

你可以使用 EAS 工作流程 在每次提交时自动创建预览。首先,你需要 配置你的项目,在项目根目录下添加一个名为 .eas/workflows/publish-preview-update.yml 的文件,然后添加以下工作流配置:

¥You can automatically create previews on every commit with EAS Workflows. First, you'll need to configure your project, add a file named .eas/workflows/publish-preview-update.yml at the root of your project, then add the following workflow configuration:

.eas/workflows/publish-preview-update.yml
name: Publish preview update

on:
  push:
    branches: ['*']

jobs:
  publish_preview_update:
    name: Publish preview update
    type: update
    params:
      branch: ${{ github.ref_name || 'test' }}

上述工作流程将在每次提交到每个分支时发布更新。你也可以使用以下 EAS CLI 命令手动运行此工作流程:

¥The workflow above will publish an update on every commit to every branch. You can also run this workflow manually with the following EAS CLI command:

Terminal
eas workflow:run publish-preview-update.yml

了解更多关于 工作流示例指南 的常见模式。

¥Learn more about common patterns with the workflows examples guide.

了解更多

¥Learn more

预览更新

了解如何在开发、预览和生产版本中预览更新。