diff --git a/.github/changelog-application.yml b/.github/changelog-application.yml new file mode 100644 index 0000000..12f580f --- /dev/null +++ b/.github/changelog-application.yml @@ -0,0 +1,8 @@ +changelog: + repository: ${GITHUB_REPOSITORY} + contributors: + exclude: + names: [ ${REPO_TEAM} ] +github: + username: spring-builds + password: ${GITHUB_TOKEN} \ No newline at end of file diff --git a/.github/workflows/changelog-for-milestone.yml b/.github/workflows/changelog-for-milestone.yml new file mode 100644 index 0000000..d4b5971 --- /dev/null +++ b/.github/workflows/changelog-for-milestone.yml @@ -0,0 +1,59 @@ +name: Generate Changelog for Provided Milestone + +on: + workflow_dispatch: + inputs: + milestone: + description: 'Milestone title, e.g 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.' + required: true + type: string + repositoryTeam: + description: 'Comma-separate GitHub user names for repository team members to exclude from contributors' + required: false + type: string + workflow_call: + inputs: + milestone: + description: 'Milestone title, e.g 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.' + required: true + type: string + repositoryTeam: + description: 'Comma-separate GitHub user names for repository team members to exclude from contributors' + required: false + type: string + +env: + GENERATOR_VERSION: 0.0.8 + +jobs: + generate-changelog: + runs-on: ubuntu-latest + steps: + + - name: Checkout Common Repo + uses: actions/checkout@v4 + with: + repository: spring-projects/spring-integration-aws + show-progress: false + + - uses: nvoxland/jar-download-action@v1 + with: + groupId: spring-io + artifactId: github-changelog-generator + version: $GENERATOR_VERSION + outputDirectory: . + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 17 + + - name: Generate Changelog + run: java -jar github-changelog-generator-$GENERATOR_VERSION.jar --spring.config.location=changelog-application.yml ${{ inputs.milestone }} changelog.md + env: + GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} + REPO_TEAM: ${{ inputs.repositoryTeam }} + + - name: Print Changelog + run: echo "::notice ::$(cat changelog.md)" \ No newline at end of file diff --git a/.github/workflows/ci-close-milestone.yml b/.github/workflows/ci-close-milestone.yml index 9ebf8a6..d50b333 100644 --- a/.github/workflows/ci-close-milestone.yml +++ b/.github/workflows/ci-close-milestone.yml @@ -2,7 +2,7 @@ name: Close Milestone on: release: - types: [created,prereleased,released,published] + types: [published] jobs: close-milestone: