diff --git a/.github/release-files-spec.json b/.github/release-files-spec.json deleted file mode 100644 index e5258d7..0000000 --- a/.github/release-files-spec.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "files": [ - { - "aql": { - "items.find": { - "$and": [ - { - "@build.name": "${buildname}", - "@build.number": "${buildnumber}", - "path": {"$match": "org/springframework*"} - }, - { - "$or": [ - { - "name": {"$match": "*.pom"} - }, - { - "name": {"$match": "*.jar"} - }, - { - "name": {"$match": "*.module"} - } - ] - } - ] - } - }, - "target": "nexus/" - } - ] -} diff --git a/.github/spring-project-init.gradle b/.github/spring-project-init.gradle deleted file mode 100644 index e8a7144..0000000 --- a/.github/spring-project-init.gradle +++ /dev/null @@ -1,47 +0,0 @@ -gradle.projectsLoaded { - rootProject { - // JFrog's build-info-extractor-gradle adds Gradle init script which does `apply plugin: ArtifactoryPlugin` - artifactory { - publish { - defaults { - def zipArtifactProps = - ['zip.name': 'spring-integration-aws', - 'zip.displayname': 'Spring Integration Aws', - 'zip.deployed': 'false'] - properties { - mavenJava zipArtifactProps, '*:*:*:*@zip' - mavenJava 'zip.type': 'docs', '*:*:*:docs@zip' - mavenJava 'zip.type': 'dist', '*:*:*:dist@zip' - } - - publications('mavenJava') - } - forkCount = 10 - } - clientConfig.setConnectionRetries(4) - } - - // No need to have this task in project: only when we perform GHA - tasks.register('nextDevelopmentVersion') { - doLast { - if (!project.version.endsWith('-SNAPSHOT')) { - String nextDevelopmentVersion - if (project.version.contains('-M') || project.version.contains('-RC')) { - nextDevelopmentVersion = project.version - ~/(M|RC)\d+/ + 'SNAPSHOT' - } - else { - def versionParts = project.version.tokenize('.') - def major = versionParts[0] - def minor = versionParts[1] - def patch = versionParts[2] as int - nextDevelopmentVersion = major + '.' + minor + '.' + (++patch)+ '-SNAPSHOT' - } - - def gradleProperties = file('gradle.properties') - def newProps = gradleProperties.text.replace(project.version, nextDevelopmentVersion) - gradleProperties.text = newProps - } - } - } - } -} \ No newline at end of file diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index fd26ee1..d3562bb 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -8,5 +8,5 @@ on: jobs: build-snapshot: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-snapshot.yml@main + uses: artembilan/spring-messaging-build-tools/spring-artifactory-gradle-snapshot.yml@main secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 6c74bd5..94e3c88 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -7,4 +7,4 @@ on: jobs: build-pull-request: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-gradle-pull-request-build.yml@main + uses: artembilan/spring-messaging-build-tools/spring-gradle-pull-request-build.yml@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20f11f1..a205abd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ run-name: Release current version for branch ${{ github.ref_name }} jobs: release: - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-release.yml@main + uses: artembilan/spring-messaging-build-tools/spring-artifactory-release.yml@main with: buildToolArgs: dist secrets: inherit \ No newline at end of file diff --git a/.github/workflows/spring-artifactory-gradle-release-staging.yml b/.github/workflows/spring-artifactory-gradle-release-staging.yml deleted file mode 100644 index b434e48..0000000 --- a/.github/workflows/spring-artifactory-gradle-release-staging.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Build with Gradle and Stage Release to Artifactory - -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 - gradleTasks: - description: 'Additional Gradle tasks. The `build` and `artifactoryPublish` are included.' - required: false - type: string - - outputs: - buildName: - description: 'Artifactory Build Name' - value: ${{ jobs.staging-to-artifactory-with-gradle.outputs.buildName }} - buildNumber: - description: 'Artifactory Build Number' - value: ${{ jobs.staging-to-artifactory-with-gradle.outputs.buildNumber }} - -env: - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - -jobs: - staging-to-artifactory-with-gradle: - runs-on: ubuntu-latest - outputs: - buildName: ${{ steps.configure-jfrog.outputs.buildName }} - buildNumber: ${{ steps.configure-jfrog.outputs.buildNumber }} - - steps: - - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - show-progress: false - - - name: Set up Gradle - uses: spring-io/spring-gradle-build-action@v2 - - - name: Checkout Common Repo - uses: actions/checkout@v4 - with: - repository: spring-projects/spring-integration-aws - path: build - show-progress: false - - - name: Copy the spring-project-init.gradle - run: rsync build/.github/spring-project-init.gradle ~/.gradle/init.d/ - - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.50.4 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - - name: Configure JFrog Cli - id: configure-jfrog - run: | - jf gradlec \ - --use-wrapper \ - --repo-deploy libs-staging-local - - buildName=${{ github.event.repository.name }}-${{ inputs.releaseVersion }} - echo JFROG_CLI_BUILD_NAME=$buildName >> $GITHUB_ENV - echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV - echo buildName=$buildName >> $GITHUB_OUTPUT - echo buildNumber=$JFROG_CLI_BUILD_NUMBER >> $GITHUB_OUTPUT - - - name: Set Release Version - run: sed -i "s/version=.*/version=${{ inputs.releaseVersion }}/" gradle.properties - - - name: Build and Publish - run: | - jf gradle clean build ${{ inputs.gradleTasks }} artifactoryPublish - jf rt build-publish - - - name: Tag Release and Next Development Version - run: | - git config --global user.name 'Spring Builds' - git config --global user.email 'builds@springframework.org' - git commit -a -m "[artifactory-release] Release version ${{ inputs.releaseVersion }}" - git tag "v${{ inputs.releaseVersion }}" - git push --tags origin - jf gradle nextDevelopmentVersion - git commit -a -m "[artifactory-release] Next development version" - git push origin diff --git a/.github/workflows/spring-artifactory-gradle-snapshot.yml b/.github/workflows/spring-artifactory-gradle-snapshot.yml deleted file mode 100644 index e6ba5cc..0000000 --- a/.github/workflows/spring-artifactory-gradle-snapshot.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: CI Artifactory SNAPSHOT Build for Gradle - -on: - workflow_call: - inputs: - gradleTasks: - description: 'Additional Gradle tasks. The `build` and `artifactoryPublish` are included.' - required: false - default: 'dist' - type: string - -env: - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - -jobs: - build-snapshot-with-gradle: - runs-on: ubuntu-latest - name: CI Build SNAPSHOT for ${{ github.ref_name }} - steps: - - - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Set up Gradle - uses: spring-io/spring-gradle-build-action@v2 - - - name: Checkout Common Repo - uses: actions/checkout@v4 - with: - repository: spring-projects/spring-integration-aws - path: build - show-progress: false - - - name: Copy the spring-project-init.gradle - run: rsync build/.github/spring-project-init.gradle ~/.gradle/init.d/ - - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.50.4 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - - name: Configure JFrog Cli - run: | - jf gradlec \ - --use-wrapper \ - --repo-deploy libs-snapshot-local - echo JFROG_CLI_BUILD_NAME=${{ github.event.repository.name }}-${{ github.ref_name }} >> $GITHUB_ENV - echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV - - - name: Build and Publish - run: | - jf gradle clean build ${{ inputs.gradleTasks }} artifactoryPublish - jf rt build-publish - diff --git a/.github/workflows/spring-artifactory-maven-release-staging.yml b/.github/workflows/spring-artifactory-maven-release-staging.yml deleted file mode 100644 index 9a60771..0000000 --- a/.github/workflows/spring-artifactory-maven-release-staging.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Build with Maven and Stage Release to Artifactory - -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 - mavenArgs: - description: 'Additional mvn command arguments: goals, plugins etc. The `install` is included.' - required: false - type: string - - outputs: - buildName: - description: 'Artifactory Build Name' - value: ${{ jobs.staging-to-artifactory-with-maven.outputs.buildName }} - buildNumber: - description: 'Artifactory Build Number' - value: ${{ jobs.staging-to-artifactory-with-maven.outputs.buildNumber }} - -jobs: - staging-to-artifactory-with-maven: - runs-on: ubuntu-latest - outputs: - buildName: ${{ steps.configure-jfrog.outputs.buildName }} - buildNumber: ${{ steps.configure-jfrog.outputs.buildNumber }} - steps: - - - uses: actions/checkout@v3 - with: - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - show-progress: false - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 17 - cache: 'maven' - - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.50.4 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - - name: Configure JFrog Cli - id: configure-jfrog - run: | - jf mvnc \ - --use-wrapper=true \ - --repo-resolve-releases=libs-milestone \ - --repo-resolve-snapshots=snapshot \ - --repo-deploy-releases=libs-staging-local \ - --repo-deploy-snapshots=libs-snapshot-local - - buildName=${{ github.event.repository.name }}-${{ inputs.releaseVersion }} - echo JFROG_CLI_BUILD_NAME=$buildName >> $GITHUB_ENV - echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV - echo buildName=$buildName >> $GITHUB_OUTPUT - echo buildNumber=$JFROG_CLI_BUILD_NUMBER >> $GITHUB_OUTPUT - - - name: Set Release Version - run: | - ./mvnw versions:set -DnewVersion=${{ inputs.releaseVersion }} -DgenerateBackupPoms=false -DprocessAllModules=true -B -ntp - - - name: Build and Publish - run: | - jf mvn install -B -ntp ${{ inputs.mavenArgs }} - jf rt build-publish - - - name: Capture Test Results - if: failure() - uses: actions/upload-artifact@v3 - with: - name: test-results - path: '**/target/surefire-reports/**/*.*' - retention-days: 3 - - - name: Tag Release and Next Development Version - run: | - git config --global user.name 'Spring Builds' - git config --global user.email 'builds@springframework.org' - git commit -a -m "[artifactory-release] Release version ${{ inputs.releaseVersion }}" - git tag "v${{ inputs.releaseVersion }}" - git push --tags origin - ./mvnw build-helper:parse-version versions:set \ - -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${{ (contains(inputs.releaseVersion, '-M') || contains(inputs.releaseVersion, '-RC')) && '${parsedVersion.incrementalVersion}' || '${parsedVersion.nextIncrementalVersion}' }}'-SNAPSHOT \ - -DgenerateBackupPoms=false -DprocessAllModules=true -B -ntp - git commit -a -m "[artifactory-release] Next development version" - git push origin diff --git a/.github/workflows/spring-artifactory-promote-central.yml b/.github/workflows/spring-artifactory-promote-central.yml deleted file mode 100644 index 8f565b1..0000000 --- a/.github/workflows/spring-artifactory-promote-central.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Promote Staged GA release from Artifactory to Maven Central - -on: - workflow_call: - inputs: - buildName: - description: 'The Artifactory Build Name' - required: true - type: string - buildNumber: - description: 'The Artifactory Build Number' - required: true - type: string - -jobs: - release-to-central: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - repository: spring-projects/spring-integration-aws - show-progress: false - - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.50.4 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - - name: Promote Build - run: jfrog rt build-promote ${{ inputs.buildName }} ${{ inputs.buildNumber }} libs-release-local - - # Download released files - - name: Download Release Files - run: | - jfrog rt download \ - --spec .github/release-files-spec.json \ - --spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}" - - # Create checksums, signatures and create staging repo on central and upload - - uses: jvalkeal/nexus-sync@v0.0.2 - id: nexus - with: - url: ${{ secrets.OSSRH_URL }} - username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} - password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} - staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }} - create: true - upload: true - generate-checksums: true - pgp-sign: true - upload-parallel: 10 - pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }} - pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - close: true - release: true \ No newline at end of file diff --git a/.github/workflows/spring-artifactory-promote-milestone.yml b/.github/workflows/spring-artifactory-promote-milestone.yml deleted file mode 100644 index 6dd24b6..0000000 --- a/.github/workflows/spring-artifactory-promote-milestone.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Promote Staged Milestone in Artifactory - -on: - workflow_call: - inputs: - buildName: - description: 'The Artifactory Build Name' - required: true - type: string - buildNumber: - description: 'The Artifactory Build Number' - required: true - type: string - -jobs: - promote-milestone-with-jfrog: - runs-on: ubuntu-latest - steps: - - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.50.4 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - - name: Promote Build - run: jfrog rt build-promote ${{ inputs.buildName }} ${{ inputs.buildNumber }} libs-milestone-local \ No newline at end of file diff --git a/.github/workflows/spring-artifactory-release.yml b/.github/workflows/spring-artifactory-release.yml deleted file mode 100644 index ce8bf8f..0000000 --- a/.github/workflows/spring-artifactory-release.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Perform Release with Artifactory - -on: - workflow_call: - inputs: - buildToolArgs: - description: 'Additional Maven or Gradle command arguments: tasks, goals, plugins etc. The `install` for Maven is included. The `build` and `artifactoryPublish` for Gradle are included.' - required: false - type: string - -env: - GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - -jobs: - releaseVersion: - runs-on: ubuntu-latest - outputs: - releaseVersion: ${{ steps.release-version.outputs.releaseVersion }} - - steps: - - - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Find Current Version to Release - id: release-version - run: | - if test -f pom.xml - then - CURRENT_VERSION=$(./mvnw help:evaluate -Dexpression="project.version" -q -DforceStdout) - else - CURRENT_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') - fi - export CANDIDATE_VERSION=${CURRENT_VERSION/-SNAPSHOT} - RELEASE_VERSION=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq 'map(select(.title | startswith(env.CANDIDATE_VERSION))) | .[0] | .title') - if [ -z $RELEASE_VERSION ] - then - gh run cancel ${{ github.run_id }} - echo "::warning title=Nothing to release::No scheduled milestone for $CURRENT_VERSION version" - else - echo releaseVersion=$RELEASE_VERSION >> $GITHUB_OUTPUT - echo "::notice title=RELEASE VERSION::$RELEASE_VERSION" - fi - - staging: - needs: releaseVersion - uses: spring-projects/spring-integration-aws/.github/workflows/spring-stage-release.yml@main - with: - releaseVersion: ${{ needs.releaseVersion.outputs.releaseVersion }} - buildToolArgs: ${{ inputs.buildToolArgs }} - secrets: inherit - - verify-staged: - needs: [releaseVersion, staging] - uses: ./.github/workflows/verify-staged-artifacts.yml - with: - releaseVersion: ${{ needs.releaseVersion.outputs.releaseVersion }} - secrets: inherit - - promote-milestone: - needs: [releaseVersion, staging, verify-staged] - if: ${{ (contains(needs.releaseVersion.outputs.releaseVersion, '-M') || contains(needs.releaseVersion.outputs.releaseVersion, '-RC')) }} - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-milestone.yml@main - with: - buildName: ${{ needs.staging.outputs.buildName }} - buildNumber: ${{ needs.staging.outputs.buildNumber }} - secrets: inherit - - promote-ga: - needs: [releaseVersion, staging, verify-staged] - if: ${{ !contains(needs.releaseVersion.outputs.releaseVersion, '-') }} - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-central.yml@main - with: - buildName: ${{ needs.staging.outputs.buildName }} - buildNumber: ${{ needs.staging.outputs.buildNumber }} - secrets: inherit - - finalize: - if: ${{ !(failure() || cancelled()) }} - needs: [releaseVersion, promote-milestone, promote-ga] - uses: spring-projects/spring-integration-aws/.github/workflows/spring-finalize-release.yml@main - with: - milestone: ${{ needs.releaseVersion.outputs.releaseVersion }} - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/spring-finalize-release.yml b/.github/workflows/spring-finalize-release.yml deleted file mode 100644 index 4f18258..0000000 --- a/.github/workflows/spring-finalize-release.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Create GH release and Notify Slack - -on: - 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 - -env: - MILESTONE: ${{ inputs.milestone }} - GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - -jobs: - finalize-releae: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Generate Changelog - run: | - repositoryTeam=$(gh api repos/$GITHUB_REPOSITORY/collaborators --jq 'map(select(.role_name == "admin") | .login) | tostring') - repositoryTeam=$(sed 's/"//g' <<< ${repositoryTeam:1:-1}) - - 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 \ - --changelog.repository=$GITHUB_REPOSITORY \ - --github.username=spring-builds \ - --github.password=$GITHUB_TOKEN \ - --changelog.contributors.exclude.names=$repositoryTeam - - - name: GitHub Release - run: | - RELEASE_URL=$(gh release create v${{ env.MILESTONE }} -F changelog.md ${{ (contains(env.MILESTONE, '-M') || contains(env.MILESTONE, '-RC')) && '--prerelease' }}) - echo "::notice title=Release Page::$RELEASE_URL" - - - name: Close Milestone - run: | - MILESTONE_ID=$(gh api repos/$GITHUB_REPOSITORY/milestones --jq '.[] | select(.title == env.MILESTONE) | .number') - if [ $MILESTONE_ID ]; then - gh api -X PATCH repos/$GITHUB_REPOSITORY/milestones/$MILESTONE_ID -f state='closed' --silent - fi - -# - name: Announce Release on Slack -# uses: slackapi/slack-github-action@v1.24.0 -# env: -# SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }} -# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK -# with: -# payload: | -# { -# "text": "${{ github.event.repository.name }}-announcing `${{ env.MILESTONE }}`" -# } \ No newline at end of file diff --git a/.github/workflows/spring-gradle-pull-request-build.yml b/.github/workflows/spring-gradle-pull-request-build.yml deleted file mode 100644 index 2cb1e53..0000000 --- a/.github/workflows/spring-gradle-pull-request-build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Pull Request Build with Gradle - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: 17 - cache: gradle - - - name: Run Gradle - uses: burrunan/gradle-cache-action@v1 - with: - debug: false - concurrent: true - gradle-build-scan-report: false - arguments: check - - - name: Capture Test Results - if: failure() - uses: actions/upload-artifact@v3 - with: - name: test-results - path: '*/build/reports/tests/**/*.*' - retention-days: 3 diff --git a/.github/workflows/spring-stage-release.yml b/.github/workflows/spring-stage-release.yml deleted file mode 100644 index 68e1e1a..0000000 --- a/.github/workflows/spring-stage-release.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Stage Release with Gradle or Maven to Artifactory - -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 - buildToolArgs: - description: 'Additional Maven or Gradle command arguments: tasks, goals, plugins etc. The `install` for Maven is included. The `build` and `artifactoryPublish` for Gradle are included.' - required: false - type: string - - outputs: - buildName: - description: 'Artifactory Build Name' - value: ${{ jobs.build-info.outputs.buildName }} - buildNumber: - description: 'Artifactory Build Number' - value: ${{ jobs.build-info.outputs.buildNumber }} - - -jobs: - maven-or-gradle: - runs-on: ubuntu-latest - outputs: - isMaven: ${{ steps.is-maven.outputs.isMaven }} - steps: - - - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Check if project is Maven-based - id: is-maven - run: | - if test -f pom.xml - then - echo isMaven=true >> $GITHUB_OUTPUT - else - echo isMaven=false >> $GITHUB_OUTPUT - fi - - staging-with-gradle: - needs: maven-or-gradle - if: ${{ needs.maven-or-gradle.outputs.isMaven == 'false' }} - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main - with: - releaseVersion: ${{ inputs.releaseVersion }} - gradleTasks: ${{ inputs.buildToolArgs }} - secrets: inherit - - - staging-with-maven: - needs: maven-or-gradle - if: ${{ needs.maven-or-gradle.outputs.isMaven == 'true' }} - uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-maven-release-staging.yml@main - with: - releaseVersion: ${{ inputs.releaseVersion }} - mavenArgs: ${{ inputs.buildToolArgs }} - secrets: inherit - - build-info: - needs: [staging-with-gradle, staging-with-maven] - if: ${{ !(failure() || cancelled()) }} - runs-on: ubuntu-latest - outputs: - buildName: ${{ steps.output-build-info.outputs.buildName }} - buildNumber: ${{ steps.output-build-info.outputs.buildNumber }} - - steps: - - name: Output Build Info - id: output-build-info - run: | - if [ ${{ needs.staging-with-gradle.outputs.buildName }} ] - then - buildName=${{ needs.staging-with-gradle.outputs.buildName }} - buildNumber=${{ needs.staging-with-gradle.outputs.buildNumber }} - else - buildName=${{ needs.staging-with-maven.outputs.buildName }} - buildNumber=${{ needs.staging-with-maven.outputs.buildNumber }} - fi - echo buildName=$buildName >> $GITHUB_OUTPUT - echo buildNumber=$buildNumber >> $GITHUB_OUTPUT - echo "::notice title=Artifactory Build Name & Number::$buildName/$buildNumber" \ No newline at end of file