Note: These steps should be done directly in the pinterest/ktlint repository, not in your personal fork.
0.50.0-prep)Echo generated changelog to the CHANGELOG.md file (two spaces) to the end of the previous line.VERSION_NAME with the new release version in the project root gradle.properties. Be sure to remove -SNAPSHOT.CHANGELOG.md to rename the Unreleased section to the new release name, following the ## [x.x.x] - YYYY-MM-DD format.CHANGELOG.md file.master.pinterest/ktlint master branch; verify you see the gradle.properties and CHANGELOG.md changes locally.git tag 0.50.0 && git push origin 0.50.0). This will kick off the Release workflow.Important: when you get an error like HttpError: refusing to allow a Personal Access Token to create or update workflow '.github/workflows/automerge-triggers.yml' without 'workflow' scope, the GitHub personal access token is most likely expired. When this happens on the bump of the Homebrew formula, the personal access token of @shashachu needs to be updated..announce script has created the <release>-update-refs branch in the repo. Create a new pull request (https://github.com/pinterest/ktlint/compare) and merge it to master.<release>-update-refs to master starts the Publish release documentation and Publish snapshot documentation workflows. Check that both workflows succeed (https://github.com/pinterest/ktlint/actions). Also check that the documentation has actually been published on https://pinterest.github.io/ktlint/latest.1.0.0 the documentation still referred to 0.50.0 (according to https://github.com/pinterest/ktlint/actions/runs/6085301212/job/16509057702#step:11:14 it tried updating 0.49.1 to 1.0.0 which most likely was caused by the already fixed issue that the changelog heading of the 0.50.0 did not comply to the expected format).gradle.properties with the new SNAPSHOT versionSometimes it can happen that after a minor release, it is required to release a patch version on an older minor version as well. For example after releasing ktlint 1.8.0 and Ktlint IntelliJ Plugin 0.30.x it turned out that starting from that version the 1.7.0 and 1.7.1 are no longer compatible with the plugin version 0.30 and above. This is blocking issue for users who can not upgrade from ktlint 1.7.x to 1.8.x or higher.
For problem above, the following steps resulted in a new 1.7.2 release being published on Maven after 1.8.0 was released:
master-1.7.x from tag 1.7.11.7.2 release.master branch change the publish-release-build.yml file as follows:on: push: tags: - '1.7.2'
actions/checkout:- uses: actions/checkout with: ref: 'master-1.7.x'
git tag 1.7.2 && git push origin 1.7.2). This will kick off the Release workflow. Important: when you get an error like HttpError: refusing to allow a Personal Access Token to create or update workflow '.github/workflows/automerge-triggers.yml' without 'workflow' scope, the GitHub personal access token is most likely expired. When this happens on the bump of the Homebrew formula, the personal access token of @shashachu needs to be updated.publish-release-build.yml. Push the branch, and merge to master.