|
| 1 | +# How to create releases |
| 2 | + |
| 3 | +## Updating the questions data |
| 4 | + |
| 5 | +All changes to question data have to be made on Google Sheets: that serves as the source of all data. |
| 6 | +The sheet can be accessed [here](https://docs.google.com/spreadsheets/d/110mI5KwlDNswGaTHGJ931A034O5Svj7X657eFspsvfE/edit?usp=sharing): |
| 7 | +if you don't have access, reach out to a PoliNetwork admin. |
| 8 | + |
| 9 | +The data on the sheet is regularly pulled by a GitHub Actions workflow on the [PoliNetworkOrg/TheTOLProjectData](https://github.com/PoliNetworkOrg/TheTOLProjectData) repo. If you want to update it manually you can dispatch the update workflow from [here](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/update.yml). |
| 10 | +The updated data is available for inspection at the `/dbpreview` and `/qpreview` routes of the website. |
| 11 | + |
| 12 | +Once you have verified that the question display correctly, you can push the changes to production by dispatching the [`deploy`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/deploy.yml) workflow. |
| 13 | + |
| 14 | +## Updating the website |
| 15 | + |
| 16 | +You can make all the changes you want on the `main` branch of this repo: they will be automatically deployed on our preview environment. |
| 17 | + |
| 18 | +When you're ready to release the changes, follow these steps: |
| 19 | + |
| 20 | +1. **Bump the version using `npm version`** |
| 21 | + You can choose to use `patch`, `minor`, or `major` depending on the changes you're releasing. |
| 22 | + |
| 23 | +2. **Push the commit and the tags to the repo: `git push && git push --tags`** |
| 24 | + If you get an error because there are tag conflicts, double check that your local branch is up-to-date; you can overwrite local tags with `git pull --tags -f`. |
| 25 | + |
| 26 | +3. **[Create a new release](https://github.com/PoliNetworkOrg/TheTOLProject/releases/new) on GitHub** |
| 27 | + Make sure you choose the tag you've just created as target. If you want to generate notes automatically (recommended) make sure to select the correct previous tag. |
| 28 | + Publish the release: this will automatically trigger the production deployment. |
| 29 | + |
| 30 | +4. **Update and deploy the db** |
| 31 | + The new website will expect a db with the same version. |
| 32 | + You'll first need update the data with the [`update`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/update.yml) workflow. After that's done you'll see that the version in the json file matches the one of the website. |
| 33 | + You can now run the [`deploy`](https://github.com/PoliNetworkOrg/TheTOLProjectData/actions/workflows/deploy.yml) workflow to push the changes to production. |
0 commit comments