diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index fe4c2fc..87b9a72 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -1,5 +1,6 @@ -# Drafts new mailtrap-java release: bumps the version in pom.xml, regenerates the changelog -# from merged PRs, and opens a release PR against main. +# Drafts new mailtrap-java release: bumps the version in pom.xml and in the install snippets +# of README.md and docs/getting-started.md, regenerates the changelog from merged PRs, +# and opens a release PR against main. # name: Draft Java Release on: @@ -64,6 +65,16 @@ jobs: if: steps.notes.outputs.release_notes != '' run: mvn versions:set -DnewVersion=${{ steps.bump.outputs.next }} -DgenerateBackupPoms=false + - name: Update version in README.md and docs/getting-started.md install snippets + if: steps.notes.outputs.release_notes != '' + env: + NEXT: ${{ steps.bump.outputs.next }} + run: | + sed -i -E \ + -e "s/(io\.mailtrap:mailtrap-java:)[0-9]+\.[0-9]+\.[0-9]+/\1${NEXT}/g" \ + -e "/mailtrap-java<\/artifactId>/,/<\/dependency>/ s/()[0-9]+\.[0-9]+\.[0-9]+(<\/version>)/\1${NEXT}\2/" \ + README.md docs/getting-started.md + - name: Prepend new section to CHANGELOG.md if: steps.notes.outputs.release_notes != '' uses: railsware/github-actions/prepend-changelog@master diff --git a/docs/getting-started.md b/docs/getting-started.md index 485210a..51e13fa 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -17,20 +17,20 @@ Maven dependency: io.mailtrap mailtrap-java - 1.3.0 + 1.7.0 ``` Gradle Groovy dependency: ```groovy -implementation 'io.mailtrap:mailtrap-java:1.3.0' +implementation 'io.mailtrap:mailtrap-java:1.7.0' ``` Gradle Kotlin DSL dependency: ```kotlin -implementation("io.mailtrap:mailtrap-java:1.3.0") +implementation("io.mailtrap:mailtrap-java:1.7.0") ``` ### 2. Authentication