From bd01f0cabdcb7e14830122d0dc2a510298fba7a5 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 19 Oct 2023 13:59:15 -0400 Subject: [PATCH] Initial CI for GH Actions --- .github/workflows/CI.yml | 44 ++++++++++++++++++++++++++++++++++++++++ publish-maven.gradle | 5 +++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000..af4bc82f --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,44 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: + - main + +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: + runs-on: ubuntu-latest + if: github.repository_owner == 'spring-projects' + name: CI Build ${{ github.ref_name }} SNAPSHOT + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: 17 + cache: gradle + - uses: jfrog/setup-jfrog-cli@v3 + env: + JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + - name: Configure JFrog Cli + run: | + jf rt gradlec \ + --use-wrapper \ + --uses-plugin \ + --deploy-ivy-desc=false \ + --server-id-resolve repo.spring.io \ + --server-id-deploy repo.spring.io \ + --repo-resolve snapshot \ + --repo-deploy snapshot + echo JFROG_CLI_BUILD_NAME=spring-integration-aws-${{ github.ref_name }} >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV + - name: Build and Publish + run: | + jf rt gradle build dist artifactoryPublish +# jf rt build-publish \ No newline at end of file diff --git a/publish-maven.gradle b/publish-maven.gradle index f52d9413..7f4a7bdd 100644 --- a/publish-maven.gradle +++ b/publish-maven.gradle @@ -56,4 +56,9 @@ publishing { artifactoryPublish { publications(publishing.publications.mavenJava) + properties { + mavenJava '*:*:*:*@zip', 'zip.name': 'spring-integration-aws', 'zip.displayname': 'Spring Integration Aws', 'zip.deployed': false + mavenJava '*:*:*:docs@zip', 'zip.type': 'docs' + mavenJava '*:*:*:dist@zip', 'zip.type': 'dist' + } }