From 1f44b12420977241ebb2aba00f11344e05a478c1 Mon Sep 17 00:00:00 2001 From: 8naama Date: Thu, 14 Nov 2024 15:05:32 +0200 Subject: [PATCH 1/2] upgrade packages --- .github/workflows/release.yml | 28 +++++++++++++++++++ .github/workflows/test.yml | 4 +-- README.md | 4 +++ pom.xml | 20 ++++++------- .../io/logz/log4j2/BaseLog4jAppenderTest.java | 2 +- 5 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..19db719 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release new version to Maven + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Get the code + uses: actions/checkout@v4 + - name: Setup Java 11 + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: 'zulu' + server-id: ossrh-nexus + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.GPG_KEY }} + gpg-passphrase: GPG_PASSPHRASE + - name: Publish to the Maven Central Repository + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: mvn deploy --batch-mode -D skipTests --activate-profiles release --no-transfer-progress \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7dd2682..f25790c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,8 @@ jobs: java: [ '11', '15','17' ] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: ${{ matrix.java }} diff --git a/README.md b/README.md index c60cd3c..7518698 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,10 @@ Will send a log to Logz.io that looks like this: ``` ### Release notes +- 2.1.0 + - Updated LogzioSender version to `2.1.0` + - Upgrade packages version + - Upgrade packages version - 2.0.1 - Updated LogzioSender version to `2.0.1` - Add `User-Agent` header with logz.io information diff --git a/pom.xml b/pom.xml index 131e8af..1ac4b13 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.logz.log4j2 logzio-log4j2-appender - 2.0.1 + 2.1.0 jar Logz.io Log4j2 Appender @@ -22,8 +22,8 @@ - Tamir Michaeli - tamir.michaeli@logz.io + Naama Bendalak + naama.bendalak@logz.io Logz.io http://logz.io @@ -36,7 +36,7 @@ - 2.0.1 + 2.1.0 @@ -44,7 +44,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + 3.13.0 11 11 @@ -53,7 +53,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.3.1 attach-sources @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.10.0 attach-javadocs @@ -150,12 +150,12 @@ org.apache.logging.log4j log4j-api - 2.15.0 + 2.24.0 org.apache.logging.log4j log4j-core - 2.17.1 + 2.24.1 io.logz.sender @@ -166,7 +166,7 @@ com.google.guava guava - 30.0-jre + 33.3.1-jre junit diff --git a/src/test/java/io/logz/log4j2/BaseLog4jAppenderTest.java b/src/test/java/io/logz/log4j2/BaseLog4jAppenderTest.java index 18d9a7f..ae703a1 100644 --- a/src/test/java/io/logz/log4j2/BaseLog4jAppenderTest.java +++ b/src/test/java/io/logz/log4j2/BaseLog4jAppenderTest.java @@ -41,7 +41,7 @@ protected void assertAdditionalFields(MockLogzioBulkListener.LogRequest logReque protected void sleepSeconds(int seconds) { logger.info("Sleeping {} [sec]...", seconds); try { - Thread.sleep(seconds * 1000); + Thread.sleep(seconds * 1000L); } catch (InterruptedException e) { throw new RuntimeException(e); } From d80b20ea49068608ad3386ce27c40adb10045248 Mon Sep 17 00:00:00 2001 From: 8naama Date: Thu, 14 Nov 2024 18:14:45 +0200 Subject: [PATCH 2/2] add release profile --- pom.xml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pom.xml b/pom.xml index 1ac4b13..5081ef1 100644 --- a/pom.xml +++ b/pom.xml @@ -174,4 +174,33 @@ 4.13.2 + + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + \ No newline at end of file