|
| 1 | +# Releasing |
| 2 | + |
| 3 | +Before releasing and publishing the Pactus software, there are a few important steps that need to be followed. |
| 4 | +Please follow the instructions below: |
| 5 | + |
| 6 | +1. Get the latest code |
| 7 | + |
| 8 | +```bash |
| 9 | +git checkout main |
| 10 | +git pull |
| 11 | +``` |
| 12 | + |
| 13 | +2. Updating Windows DLLS |
| 14 | + |
| 15 | +To ensure that the GUI can find the required dependency DLLs in Windows, we may need to update them. |
| 16 | +Follow these commands in the project's root directory, using[MSYS2](https://www.msys2.org/): |
| 17 | + |
| 18 | +```bash |
| 19 | +git pull |
| 20 | +pacman -Suyyy |
| 21 | +.github/releasers/releaser_gui_windows.sh |
| 22 | +``` |
| 23 | + |
| 24 | +Wait for the build to finish. If everything is okay, proceed to the next step. |
| 25 | +Otherwise, update the dependency DLLs inside `.github/releasers/releaser_gui_windows.sh` and |
| 26 | +run the above command again. |
| 27 | + |
| 28 | +3. Check the config |
| 29 | + |
| 30 | +Double-check the config files to ensure they are up to date. |
| 31 | + |
| 32 | +4. Creating Environment Variables |
| 33 | + |
| 34 | +Let's create environment variables for the release version. |
| 35 | +For the rest of this document, we will use these environment variables in the commands. |
| 36 | + |
| 37 | +```bash |
| 38 | +VERSION="0.11.0" |
| 39 | +TAG_NAME="v${VERSION}" |
| 40 | +TAG_MESSAGE="Version ${VERSION}" |
| 41 | +``` |
| 42 | + |
| 43 | +For the rest of this document, we will use these environment variables in commands. |
| 44 | + |
| 45 | +5. Update Changelog |
| 46 | + |
| 47 | +Use [Commitizen](https://github.com/commitizen-tools/commitizen) to update the CHANGELOG. |
| 48 | +Run the following command: |
| 49 | + |
| 50 | +```bash |
| 51 | +cz changelog --incremental --unreleased-version $VERSION |
| 52 | +``` |
| 53 | + |
| 54 | +Sometimes you may need to amend the changelog manually. |
| 55 | +Create a comparison link for the changelog header, like: |
| 56 | + |
| 57 | +```text |
| 58 | +## [0.11.0](https://github.com/pactus-project/pactus/compare/v0.10.0...v0.11.0) |
| 59 | +``` |
| 60 | + |
| 61 | +6. Create release PR |
| 62 | + |
| 63 | +Create a new PR against the `main` branch: |
| 64 | + |
| 65 | +```bash |
| 66 | +git checkout -b releasing_$VERSION |
| 67 | +git commit -a -m "chore: Releasing version $VERSION" |
| 68 | +git push origin HEAD |
| 69 | +``` |
| 70 | + |
| 71 | +Wait for the PR to be approved and merged into the `main` branch. |
| 72 | + |
| 73 | +7. Tagging |
| 74 | + |
| 75 | +Create a git tag: |
| 76 | + |
| 77 | +```bash |
| 78 | +git checkout main |
| 79 | +git pull |
| 80 | +git tag -s -a $TAG_NAME -m $TAG_MESSAGE |
| 81 | +``` |
| 82 | + |
| 83 | +check the tag info: |
| 84 | + |
| 85 | +```bash |
| 86 | +git show $TAG_NAME |
| 87 | +``` |
| 88 | + |
| 89 | +8. Push the tag |
| 90 | + |
| 91 | +Now you can push the tag to the repository: |
| 92 | + |
| 93 | +```bash |
| 94 | +git push origin $TAG_NAME |
| 95 | +``` |
| 96 | + |
| 97 | +Pushing the tag will automatically create a release tag and build the binaries. |
| 98 | + |
| 99 | +9. Bumping version |
| 100 | + |
| 101 | +Update the version inside the `version/version.go` to `0.12.0` |
| 102 | +Also update the version inside this document in step 3 and 4 to `0.12.0` |
| 103 | + |
| 104 | +Create a new PR against `main` branch: |
| 105 | + |
| 106 | +```bash |
| 107 | +git checkout -b bumping_0.12.0 |
| 108 | +git commit -a -m "chore: bumping version to 0.12.0" |
| 109 | +git push origin HEAD |
| 110 | +``` |
| 111 | + |
| 112 | +Wait for the PR to be approved and merged into the `main` branch. |
| 113 | + |
| 114 | +10. Update the website |
| 115 | + |
| 116 | +Create a new announcement post in the [blog](https://pactus.org/blog/) and |
| 117 | +update the [Road Map](https://pactus.org/about/roadmap/). |
| 118 | +Additionally, draft a new release on the |
| 119 | +[GitHub Releases](https://github.com/pactus-project/pactus/releases) page. |
| 120 | + |
| 121 | +11. Celebrate 🎉 |
0 commit comments