From 33ae83d35612ae194d1194d716f38e87a82b646d Mon Sep 17 00:00:00 2001 From: Michele Rastelli Date: Tue, 18 Jun 2024 21:58:19 +0200 Subject: [PATCH] [DE-823] CI: deploy (#309) * CI: deploy * CI: rm GH Actions deploy --- .circleci/config.yml | 23 ++++++++++++++++++- .circleci/maven-release-settings.xml | 24 ++++++++++++++++++++ .github/workflows/maven-deploy.yml | 34 ---------------------------- 3 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 .circleci/maven-release-settings.xml delete mode 100644 .github/workflows/maven-deploy.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 08e0609d..3bf3d089 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,7 +148,20 @@ jobs: working_directory: integration-tests - report - store_cache - + deploy: + executor: 'j17' + steps: + - timeout + - checkout + - load_cache + - mvn-info + - run: + name: Add GPG key + command: echo $GPG_PRIVATE_KEY | base64 --decode | gpg --batch --no-tty --import --yes + - run: + name: Deploy to Apache Maven Central + command: mvn -s .circleci/maven-release-settings.xml -DskipTests deploy + - store_cache workflows: test-adb-version: when: @@ -197,3 +210,11 @@ workflows: spring-boot-version: - '3.2.6' - '3.3.0' + deploy: + jobs: + - deploy: + filters: + tags: + only: /^deploy.*/ + branches: + ignore: /.*/ \ No newline at end of file diff --git a/.circleci/maven-release-settings.xml b/.circleci/maven-release-settings.xml new file mode 100644 index 00000000..0c29b9e6 --- /dev/null +++ b/.circleci/maven-release-settings.xml @@ -0,0 +1,24 @@ + + + + + ossrh + + true + + + ${env.GPG_PASSPHRASE} + + + + + + + ossrh + ${env.OSSRH_USERNAME} + ${env.OSSRH_PASSWORD} + + + + diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml deleted file mode 100644 index 3d3c70a7..00000000 --- a/.github/workflows/maven-deploy.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Deploy - -on: - workflow_dispatch: - push: - tags: [ deploy** ] - -jobs: - deploy: - timeout-minutes: 20 - runs-on: ubuntu-latest - - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: 'maven' - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_CENTRAL_TOKEN - gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE - - name: Publish to Apache Maven Central - run: mvn --no-transfer-progress -Dmaven.test.skip=true deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}