Skip to content

Commit

Permalink
Fix checking of heading in release notes (#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-dingemans committed Oct 13, 2023
1 parent d9489ad commit dfefb6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
if: ${{ success() }}
run: |
FIRST_HEADING2=$(grep "^## " CHANGELOG.md | head -n 1)
if [[ "$FIRST_HEADING2" != "## [Unreleased]" ]]; then
echo "First heading at level 2 should be '## [Unreleased]'"
if [[ "$FIRST_HEADING2" =~ ^##[[:space:]]\[[0-9]+\.[0-9]+\.[0-9]+\][[:space:]]-[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "First heading at level 2 should match '## [X.Y.Z] - [YYYY-MM-DD]'"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: These steps should be done directly in the pinterest/ktlint repository, no
5. Add the new release to the bottom of the `CHANGELOG.md` file.
6. Push your changes to the branch, and merge it to `master`.
7. Update your local `pinterest/ktlint` `master` branch; verify you see the `gradle.properties` and `CHANGELOG.md` changes locally.
8. Add a tag with the new release version, and push it directly to remote (e.g. `git tag 0.50.0 && git push origin 0.50.0`). This will kick off the [Release workflow](https://github.com/pinterest/ktlint/actions/workflows/release.yml).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.
8. Add a tag with the new release version, and push it directly to remote (e.g. `git tag 0.50.0 && git push origin 0.50.0`). This will kick off the [Release workflow](https://github.com/pinterest/ktlint/actions/workflows/publish-release-build.yml).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.
9. Close and release the repo on Sonatype. Only Pinterest employees can do this. Wait with steps below until artifacts are published on https://central.sonatype.com/search?q=ktlint&sort=published
10. The `.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.
11. Merge of branch `<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.
Expand Down

0 comments on commit dfefb6b

Please sign in to comment.