与你的团队分享预览
通过在分支上发布更新与你的团队共享应用预览。
一旦你在某个分支上进行了更改,你可以通过发布更新将它们与团队共享。这使你能够在审查期间获得对更改的反馈。
🌐 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 CLI 命令来发布当前更改的预览:
🌐 You can publish a preview of your current changes by running the following EAS CLI command:
- 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:
✔ 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 Workflows 在每次提交时自动创建预览。首先,你需要 配置你的项目,在项目根目录下添加一个名为 .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:
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:
- eas workflow:run publish-preview-update.yml通过工作流示例指南了解更多常见模式。
🌐 Learn more about common patterns with the workflows examples guide.
了解更多
🌐 Learn more
了解如何在开发、预览和生产版本中预览更新。