| 1 | # Deploy Process |
| 2 | |
| 3 | !!! Warning |
| 4 | |
| 5 | This section is currently WIP. |
| 6 | |
| 7 | !!! Warning |
| 8 | |
| 9 | This section is intended for people who wish to work on/build/distribute bottom, not general users. |
| 10 | |
| 11 | ## Overview |
| 12 | |
| 13 | bottom currently has two main deploy processes to worry about: |
| 14 | |
| 15 | - [Nightly](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/nightly.yml): a daily (00:00 UTC) GitHub action to build binary/installer files, and upload them to the nightly release ([example](https://bottom.pages.dev/nightly/nightly-release)). It can also be triggered manually as either a proper nightly release or a mock release. |
| 16 | - [Stable](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/deployment.yml): a stable deployment, triggered manually or upon creation of a valid tag. This is a GitHub action that builds binary/installer files and uploads them to a new GitHub release. |
| 17 | |
| 18 | Furthermore, this workflow does not handle the following deployments, which must be manually handled: |
| 19 | |
| 20 | - [Chocolatey](https://community.chocolatey.org/packages/bottom) |
| 21 | - [crates.io](https://crates.io/crates/bottom) |
| 22 | |
| 23 | ## Nightly |
| 24 | |
| 25 | This is, for the most part, automatic, though it can also be used as a way of testing build workflow changes and seeing if binaries can be successfully built at all against all the targets we want to build for. |
| 26 | |
| 27 | If one does not want to actually update the nightly release, and just want to test the general builds and workflow, one can run the workflow manually on a branch of choice with "mock" set as the parameter. Changing it to anything else will trigger a non-mock run. |
| 28 | |
| 29 | ## Stable |
| 30 | |
| 31 | This can be manually triggered, though the general use-case is setting a tag of the form `x.y.z` (after checking everything is good, of course). For example: |
| 32 | |
| 33 | ```bash |
| 34 | git tag 0.6.9 && git push origin 0.6.9 |
| 35 | ``` |
| 36 | |
| 37 | This will automatically trigger the deployment workflow, and create a draft release with the files uploaded. One still needs to fill in the details and release it. |
| 38 | |
| 39 | Furthermore, there are some deployments that are handled by maintainers of bottom that this workflow does not automatically finish. These must be manually handled. |
| 40 | |
| 41 | ### crates.io |
| 42 | |
| 43 | Validate everything builds properly and works (you should have done this before releasing though). If good, then deploying on crates.io is as simple as: |
| 44 | |
| 45 | ```bash |
| 46 | cargo publish |
| 47 | ``` |
| 48 | |
| 49 | ### Chocolatey |
| 50 | |
| 51 | Upon releasing on GitHub, [choco-bottom](https://github.com/ClementTsang/choco-bottom) will automatically be updated with a new PR with the correct deployment files for Chocolatey. Check the PR, merge it if it is correct, then pull locally and deploy following the instructions in the [README](https://github.com/ClementTsang/choco-bottom/blob/master/README.md). Make sure to test installation and running at least once before deploying! |
| 52 | |
| 53 | If done correctly, there should be a new build on Chocolatey, which will take some time to validate. |
| 54 | |
| 55 | ### winget |
| 56 | |
| 57 | Sometimes, people will kindly do it, but it can also be manually triggered using |
| 58 | [winget-bottom](https://github.com/ClementTsang/winget-bottom). |
| 59 | |
| 60 | Note this requires regenerating some secrets. |