|
| 1 | +# Super-App-Showcase Release Process |
| 2 | + |
| 3 | +This document explains the detailed process of releasing the Super-App-Showcase. The release process is divided into three major sections: |
| 4 | + |
| 5 | +1. Releasing Mini-Apps |
| 6 | +2. Deploying Catalog-Server |
| 7 | +3. Deploying Apps to the Stores |
| 8 | + |
| 9 | +Please follow the below guidelines for each step of the process. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## 1. Releasing Mini-Apps |
| 14 | + |
| 15 | +Mini-apps are released by creating and bumping its version via changeset. Please follow these steps to successfully release mini-apps: |
| 16 | + |
| 17 | +1. **Run Changeset Version Command**: Execute the following command to create a changeset: |
| 18 | + |
| 19 | +```bash |
| 20 | +yarn changeset version |
| 21 | +``` |
| 22 | + |
| 23 | +This assumes that the repository is correctly set up with node_modules installed and there are already some changesets ready to be used for the next version. |
| 24 | + |
| 25 | +2. **Update Compatibility Matrix**: Run the script to update the compatibility matrix. This matrix keeps information on compatibility between mini-apps and the host/shell app. Here's the command to execute: |
| 26 | + |
| 27 | +```bash |
| 28 | +yarn node scripts/update-compatibility-matrix.js |
| 29 | +``` |
| 30 | + |
| 31 | +This script goes through all the packages in the monorepo and determines their compatibility based on semantic versioning rules. It's vital to have an accurate compatibility matrix because it dictates which versions of federated dependencies are compatible with which versions of the app. It is assumed that the project uses semantic versioning for package versions. |
| 32 | + |
| 33 | +3. **Create a Pull Request (PR)**: Create a PR that includes updated CHANGELOG.md from changesets, bumped version packages, and updated compatibility matrix. The PR should have "Release" in the title. Example: `Release: auth v0.0.1`. |
| 34 | + |
| 35 | +4. **Release Mini-Apps**: After the PR is merged, release the mini-apps by creating and pushing git tags of the specific format: `<mini-app>-<platform>@<version>`. You can use the following command to create a tag: |
| 36 | + |
| 37 | +```bash |
| 38 | + |
| 39 | + |
| 40 | +git push --tags |
| 41 | +``` |
| 42 | + |
| 43 | +In this format, `<mini-app>` represents the package name of the mini-apps in the repository (auth, booking, dashboard, shopping), `<platform>` represents either ios or android, and `<version>` represents the current version of that mini-app in its `package.json`. |
| 44 | + |
| 45 | +5. **Create and Upload a Release**: When the tag is pushed, the GitHub workflow is launched for each tag pushed. This workflow creates a build of that mini-app and uploads it to GitHub Releases. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 2. Deploying Catalog-Server |
| 50 | + |
| 51 | +The catalog-server is manually deployed once the mini-apps have been released. It gathers URLs to the releases and deploys itself to production, exposing the mini-apps to the host app in production. |
| 52 | + |
| 53 | +The catalog-server can be deployed via a manual GitHub workflow. This workflow triggers deployment on Vercel where the catalog-server is hosted. The Vercel deployment includes running a build script that reads the 'compatibility-matrix.json' file and generates URLs for iOS and Android application bundles. It organizes the generated URLs into a JSON object, separated by platform and application version, and writes this JSON object to a file named '[appName].prod.json' in the 'data' directory. |
| 54 | + |
| 55 | +For the catalog-server deployment to be successful, ensure that the mini-apps are properly released on GitHub and that the compatibility matrix isn't corrupted. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 3. Deploying Apps to the Stores |
| 60 | + |
| 61 | +Please note, as of now the process for releasing the host app to the stores is not yet implemented. This section will be updated as soon as the implementation is done. |
| 62 | + |
| 63 | +**TODO**: Implement and document the process of deploying apps to the stores. |
| 64 | + |
| 65 | +--- |
0 commit comments