diff --git a/.github/workflows/promote-ga-to-central.yml b/.github/workflows/promote-ga-to-central.yml deleted file mode 100644 index 5ebfe12..0000000 --- a/.github/workflows/promote-ga-to-central.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Promote Staged GA to Central - -on: - workflow_dispatch: - inputs: - buildName: - description: 'The Artifactory Build Name' - required: true - buildNumber: - description: 'The Artifactory Build Number' - required: true - -jobs: - release_to_central: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-central.yml@main - with: - buildName: ${{ inputs.buildName }} - buildNumber: ${{ inputs.buildNumber }} - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/promote-milestone.yml b/.github/workflows/promote-milestone.yml deleted file mode 100644 index 1ee3b98..0000000 --- a/.github/workflows/promote-milestone.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Promote Staged Milestone - -on: - workflow_dispatch: - inputs: - buildName: - description: 'The Artifactory Build Name' - required: true - buildNumber: - description: 'The Artifactory Build Number' - required: true - -jobs: - promote_milestone: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-milestone.yml@main - with: - buildName: ${{ inputs.buildName }} - buildNumber: ${{ inputs.buildNumber }} - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-staging.yml b/.github/workflows/release.yml similarity index 67% rename from .github/workflows/release-staging.yml rename to .github/workflows/release.yml index 569dae5..6673fca 100644 --- a/.github/workflows/release-staging.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Build and Stage Release +name: Perform Release on: workflow_dispatch: @@ -6,12 +6,12 @@ on: releaseVersion: description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.' required: true - -run-name: Release version ${{ inputs.releaseVersion }} + type: string jobs: - staging: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main + release: + uses: spring-projects/spring-integration-aws/.github/workflows/spring-release.yml@main with: releaseVersion: ${{ inputs.releaseVersion }} + repositoryTeam: artembilan,garyrussell secrets: inherit \ No newline at end of file diff --git a/.github/workflows/finalize-release.yml b/.github/workflows/spring-finalize-release.yml similarity index 84% rename from .github/workflows/finalize-release.yml rename to .github/workflows/spring-finalize-release.yml index 62b696a..3cf6f70 100644 --- a/.github/workflows/finalize-release.yml +++ b/.github/workflows/spring-finalize-release.yml @@ -1,16 +1,6 @@ name: Create GH release and Notify Slack 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: @@ -39,7 +29,7 @@ jobs: run: | wget -q https://github.com/spring-io/github-changelog-generator/releases/download/v0.0.8/github-changelog-generator.jar - java -jar github-changelog-generator.jar $MILESTONE changelog.md --debug \ + java -jar github-changelog-generator.jar $MILESTONE changelog.md \ --changelog.repository=$GITHUB_REPOSITORY \ --github.username=spring-builds \ --github.password=${{ secrets.GH_ACTIONS_REPO_TOKEN }} \ diff --git a/.github/workflows/spring-release.yml b/.github/workflows/spring-release.yml new file mode 100644 index 0000000..155c8fc --- /dev/null +++ b/.github/workflows/spring-release.yml @@ -0,0 +1,58 @@ +name: Perform Release + +on: + workflow_call: + inputs: + releaseVersion: + description: 'Release version like 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 + +run-name: Release version ${{ inputs.releaseVersion }} + +env: + IS_GA: ${{ (contains(inputs.releaseVersion, '-M') || contains(inputs.releaseVersion, '-RC')) && false || true }} + +jobs: + staging: + uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main + with: + releaseVersion: ${{ inputs.releaseVersion }} + secrets: inherit + + verify-staged: + needs: staging + uses: ./.github/workflows/verify-staged-artifacts.yml + with: + releaseVersion: ${{ inputs.releaseVersion }} + secrets: inherit + + promote_milestone: + if: ${{ !env.IS_GA }} + needs: verify-staged + uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-milestone.yml@main + with: + buildName: $JFROG_CLI_BUILD_NAME + buildNumber: $JFROG_CLI_BUILD_NUMBER + secrets: inherit + + promote_ga: + if: ${{ env.IS_GA }} + needs: verify-staged + uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-central.yml@main + with: + buildName: $JFROG_CLI_BUILD_NAME + buildNumber: $JFROG_CLI_BUILD_NUMBER + secrets: inherit + + finalize: + needs: [promote_milestone, promote_ga] + uses: spring-projects/spring-integration-aws/.github/workflows/spring-finalize-release.yml@main + with: + milestone: ${{ inputs.releaseVersion }} + repositoryTeam: ${{ inputs.repositoryTeam }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/verify-staged-artifacts.yml b/.github/workflows/verify-staged-artifacts.yml new file mode 100644 index 0000000..a46e3d5 --- /dev/null +++ b/.github/workflows/verify-staged-artifacts.yml @@ -0,0 +1,25 @@ +name: Verify Staged Artifacts + +on: + workflow_call: + inputs: + releaseVersion: + description: 'Release version like 3.0.0-M1, 3.1.0-RC1, 3.2.0 etc.' + required: true + type: string + +jobs: + verify-staged: + needs: staging + runs-on: ubuntu-latest + steps: + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 17 + cache: 'maven' + + - name: Download staged artifact + run: mvn dependency:get -DrepoUrl=https://repo.spring.io/libs-staging-local -Dartifact=org.springframework.integration:spring-integration-aws:${{ inputs.releaseVersion }} \ No newline at end of file