Edit and publish protected apps
Publish apps, create new releases, and restore previous versions with Source Control.
Once the app is protected, builders can make edits to the app from the app builder. Each thread in the Chat tab functions as a branch in the git model. Learn more about threading.
Opening a pull request and integrating changes into the main branch of the repository creates a new published version of your app. You can also choose to tag a release in order to pin a published version that you want end users to see.
Create a new published version
Use the following steps to create a new published version.
If you have never tagged a release, then creating a new published version using these steps means that app users will see the version of your app represented by your repository's main branch. If you want to manually release new versions of your app to users, tag a release.
- After you've made edits (either manually in the Code tab or using AI in the Chat tab), click Ask to publish in the top right corner of the app builder.
- Review the Publish checklist. Retool performs several checks to ensure that your app is ready to publish:
- All function runs are approved. If there are unapproved functions, click Review functions to view the functions that still need approval.
- Your changes do not conflict with the published version changes from other users. If there is a new published version of your app, click Integrate changes to ask the agent to resolve the conflict.
- Click Publishing options to see additional options:
- Define a descriptive name for the App URL.
- For cloud instances, URLs are constructed in the following format:
<orgSubdomain>--<appName>.retool.app. - For self-hosted instances, URLs are constructed in the following format:
https://example.retool.com/rr/app/<appName>.
- For cloud instances, URLs are constructed in the following format:
- Tag this version as a release. Tagging this version as a release means that once your pull request is merged, users will be shown this version of the app. In order to show users a new version, you must tag a new release. You can also choose to tag a published version as a release later.
- Define a descriptive name for the App URL.
- Click Open pull request.
- Review the details of your pull request, and create it.
- When you're ready, merge the pull request.
- In the app editor, click to sync the app builder with the remote changes.
Tag a release
To show app users a particular published version of your app, tag a new release using the following steps:
- In the navbar, click to open the Version History pane. Switch to the Publish history tab, which shows all published versions.
- Find your desired published version, and click the icon.
- In the Tag release modal that opens, choose whether you want to tag your release as a Major, Minor, or Patch version. In response to Which version of this app should be published?, choose This tagged release.
- Click Tag release.
If you want to return to the default behavior, in which the published app version updates automatically according to your main branch, tag the most recent release. In response to Which version of this app should be published?, choose Latest release.
Restore a previous version
You can restore a previous version of your app to a new feature branch using the following steps:
- Start a new thread in the Chat tab.
- In the navbar, click to open the Version History pane. Switch to the Publish history tab, which shows all published versions.
- Find your desired published version, and click Restore. After a few moments, the preview canvas updates to show that version of the app.
- You can then make any further changes to your app.
To publish the restored version that is on your branch, follow the steps for creating a new published version.
Sync changes with remote
To sync the changes on your branch with remote, click to open the Version History pane, and click the button to sync. Retool also automatically performs a sync at periodic intervals and when you click Ask to publish. If your branch is out of sync, a banner appears in the status bar at the bottom of the app builder:
- There is a new version of your branch: The banner shows a message that says
Changes made by [contributor] are waiting for you. - There is a new version of the main branch: The banner shows a message that says
A new version of this app has been published.
Click the alert in the status bar to ask the agent to integrate the changes.