From 47a67924b432262a9d73420e5b9043d4acd1819a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Va=C5=BEan?= Date: Mon, 13 Nov 2023 15:04:21 +0000 Subject: [PATCH] Standalone workflows, upgraded dependencies, updated link to Maven Central --- .github/workflows/build.yml | 21 +++++++++++++++++---- .github/workflows/release.yml | 27 ++++++++++++++++++++------- README.md | 2 +- pom.xml | 16 ++++++++-------- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74c1b51..0f39df1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,20 @@ on: workflow_dispatch: jobs: build: - uses: robertvazan/rvscaffold/.github/workflows/java-build.yml@master - with: - java-version: 17 - test-coverage: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 17 + cache: maven + - name: Maven + run: | + # GPG must be skipped, because CI server does not have release GPG key. + # Failure on javadoc warnings is enabled only in CI builds, + # so that warnings specific to one JDK version do not break independent builds. + # Printing maven version (-V) helps diagnose CI-specific build behavior. + # JaCoCo phase is needed to create code coverage report that will be later uploaded to Codecov. + mvn install jacoco:report -Dgpg.skip=true -Dmaven.javadoc.failOnWarnings=true -B -V + - uses: codecov/codecov-action@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 091dce7..79cfd50 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,23 @@ name: release on: workflow_dispatch jobs: release: - uses: robertvazan/rvscaffold/.github/workflows/java-release.yml@master - with: - java-version: 17 - secrets: - server-password: ${{ secrets.MAVEN_SERVER_PASSWORD }} - signing-key: ${{ secrets.MAVEN_SIGNING_KEY }} - signing-password: ${{ secrets.MAVEN_SIGNING_PASSWORD }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 17 + server-id: ossrh + server-username: MAVEN_SERVER_USERNAME + server-password: MAVEN_SERVER_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_SIGNING_KEY }} + gpg-passphrase: MAVEN_SIGNING_PASSWORD + cache: maven + - name: Maven + # Printing maven version (-V) helps diagnose GitHub-specific build behavior. + run: mvn -B -V deploy + env: + MAVEN_SERVER_USERNAME: robertvazan + MAVEN_SERVER_PASSWORD: ${{ secrets.MAVEN_SERVER_PASSWORD }} + MAVEN_SIGNING_PASSWORD: ${{ secrets.MAVEN_SIGNING_PASSWORD }} diff --git a/README.md b/README.md index a5f7a31..f8b753b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Reactive preferences for Hookless -[![Maven Central](https://img.shields.io/maven-central/v/com.machinezoo.hookless/hookless-prefs)](https://search.maven.org/artifact/com.machinezoo.hookless/hookless-prefs) +[![Maven Central](https://img.shields.io/maven-central/v/com.machinezoo.hookless/hookless-prefs)](https://central.sonatype.com/artifact/com.machinezoo.hookless/hookless-prefs) [![Build status](https://github.com/robertvazan/hookless-prefs/workflows/build/badge.svg)](https://github.com/robertvazan/hookless-prefs/actions/workflows/build.yml) [![Test coverage](https://codecov.io/gh/robertvazan/hookless-prefs/branch/master/graph/badge.svg)](https://codecov.io/gh/robertvazan/hookless-prefs) diff --git a/pom.xml b/pom.xml index ed73b9c..6e4514e 100644 --- a/pom.xml +++ b/pom.xml @@ -52,12 +52,12 @@ com.machinezoo.hookless hookless - 0.16.0 + 0.16.1 com.google.guava guava - 31.0.1-jre + 32.1.3-jre @@ -65,16 +65,16 @@ maven-compiler-plugin - 3.8.1 + 3.11.0 maven-surefire-plugin - 3.0.0-M5 + 3.2.2 org.jacoco jacoco-maven-plugin - 0.8.7 + 0.8.11 prepare-agent @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.6.2 true all,-missing @@ -118,7 +118,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.3.0 attach-sources @@ -149,7 +149,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.1.0 --pinentry-mode