From a9239e1e1ec1c47fb09fb35313805cc5760cac42 Mon Sep 17 00:00:00 2001 From: Dario Mauri Date: Mon, 6 May 2024 17:33:06 +0200 Subject: [PATCH] Create release steps to publish to Maven Central --- .github/workflows/release.yml | 18 ++++++++++++++++-- pom.xml | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 001db8f..31785bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 + - name: Set up JDK 17 to publish to GitHub Packages uses: actions/setup-java@v4 with: java-version: '17' @@ -22,8 +22,22 @@ jobs: cache: 'maven' server-id: github settings-path: ${{ github.workspace }} - - name: Publish to GitHub Packages run: mvn --batch-mode -s $GITHUB_WORKSPACE/settings.xml deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up JDK 17 to publish to Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: 'maven' + server-id: central + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish to Maven Central Repository + run: mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} diff --git a/pom.xml b/pom.xml index 0565a31..c7169e6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.github.dario-mr time-it - 1.0.0 + 1.0.1 Time It Library to log the execution time in your Spring Boot components