diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 782d910..bb82791 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -1,6 +1,7 @@ -# Placeholder draft-release workflow +# Drafts new mailtrap-java release: bumps the version in pom.xml, regenerates the changelog +# from merged PRs, and opens a release PR against main. # -name: Draft java Release +name: Draft Java Release on: workflow_dispatch: inputs: @@ -14,14 +15,75 @@ on: - major default: patch +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +permissions: + contents: write + pull-requests: write + jobs: draft-release: - name: Draft java Release (placeholder) + name: Draft mailtrap-java Release runs-on: ubuntu-latest steps: - - name: Echo inputs - env: - BUMP_TYPE: ${{ inputs.bump_type }} - run: | - echo "Placeholder draft-release workflow" - echo "bump_type=$BUMP_TYPE" + - uses: actions/checkout@v4 + with: + ref: debug + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Read current version + id: read + run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> "$GITHUB_OUTPUT" + + - name: Compute next version + id: bump + uses: railsware/github-actions/compute-next-semver@master + with: + current: ${{ steps.read.outputs.version }} + bump-type: ${{ inputs.bump_type }} + + - name: Abort if tag already exists + uses: railsware/github-actions/abort-if-tag-exists@master + with: + tag: ${{ steps.bump.outputs.tag }} + + - name: Generate release notes + id: notes + uses: railsware/github-actions/generate-release-notes@master + with: + tag: ${{ steps.bump.outputs.tag }} + + - name: Bump version in pom.xml + if: steps.notes.outputs.release_notes != '' + run: mvn versions:set -DnewVersion=${{ steps.bump.outputs.next }} -DgenerateBackupPoms=false + + - name: Prepend new section to CHANGELOG.md + if: steps.notes.outputs.release_notes != '' + uses: railsware/github-actions/prepend-changelog@master + with: + version: ${{ steps.bump.outputs.next }} + release-notes: ${{ steps.notes.outputs.release_notes }} + + - name: Commit, push, open PR + if: steps.notes.outputs.release_notes != '' + uses: railsware/github-actions/open-sdk-release-pr@master + with: + tag: ${{ steps.bump.outputs.tag }} + current: ${{ steps.read.outputs.version }} + next: ${{ steps.bump.outputs.next }} + bump-type: ${{ inputs.bump_type }} + release-notes: ${{ steps.notes.outputs.release_notes }} + + - name: Create draft GitHub release + if: steps.notes.outputs.release_notes != '' + uses: railsware/github-actions/create-draft-github-release@master + with: + tag: ${{ steps.bump.outputs.tag }} + release-notes: ${{ steps.notes.outputs.release_notes }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aed7ef5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,28 @@ +## [1.3.1] - 2026-07-10 + +## What's Changed +* Release v1.3.0 by @IgorDobryn in https://github.com/mailtrap/mailtrap-java/pull/52 +* MT-22022: Add webhook signature verification helper by @Rabsztok in https://github.com/mailtrap/mailtrap-java/pull/53 +* Bump com.fasterxml.jackson.core:jackson-databind from 2.17.2 to 2.22.0 by @dependabot[bot] in https://github.com/mailtrap/mailtrap-java/pull/55 +* Add draft-release workflow placeholder by @IgorDobryn in https://github.com/mailtrap/mailtrap-java/pull/54 + +## New Contributors +* @Rabsztok made their first contribution in https://github.com/mailtrap/mailtrap-java/pull/53 + +**Full Changelog**: https://github.com/mailtrap/mailtrap-java/compare/v1.3.0...v1.3.1 + +## [1.3.0] - 2026-05-14 + +See https://github.com/mailtrap/mailtrap-java/releases/tag/v1.3.0 + +## [1.2.0] - 2026-03-23 + +See https://github.com/mailtrap/mailtrap-java/releases/tag/v1.2.0 + +## [1.1.0] - 2025-10-24 + +See https://github.com/mailtrap/mailtrap-java/releases/tag/v1.1.0 + +## [1.0.0] - 2025-02-19 + +See https://github.com/mailtrap/mailtrap-java/releases/tag/v1.0.0 diff --git a/pom.xml b/pom.xml index e69615e..46791f5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.mailtrap mailtrap-java - 1.3.0 + 1.3.1 Mailtrap Java SDK The official Mailtrap SDK for Java provides Java APIs