Skip to content

Commit

Permalink
Merge pull request #30 from dogukancagatay/release-0.5.0
Browse files Browse the repository at this point in the history
release: version 0.5.0
  • Loading branch information
dogukancagatay authored Nov 28, 2024
2 parents 6ae9075 + e9cfd21 commit dc1a71e
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
name: Set up JDK ${{ matrix.java_version }}
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: "${{ matrix.java_version }}"
distribution: "temurin"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Build and Publish

on:
release:
types: [created]

env:
JAVA_VERSION: "8"
MAVEN_PROFILE: "gh-action"

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
cache: maven
server-id: central # Value of the publishingServerId of central-publishing-maven-plugin plugin of the pom.xml
server-username: MAVEN_USERNAME # env Value of the server username in the settings.xml
server-password: MAVEN_CENTRAL_TOKEN # env Value of the server password in the settings.xml
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of armored the private key
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env Value of the server password in the settings.xml

- name: Publish package to Sonatype Maven Central
run: mvn -B -P ${{ env.MAVEN_PROFILE }} -Dgpg.keyname=${{ secrets.MAVEN_GPG_KEYNAME }} deploy
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ If you are using Maven, simply add the following in your `pom.xml`
<dependency>
<groupId>com.dgkncgty</groupId>
<artifactId>logback-journal</artifactId>
<version>0.4.0</version>
<version>0.5.0</version>
</dependency>
```

If you are using Gradle, add this to your `build.gradle`
```groovy
implementation 'com.dgkncgty:logback-journal:0.4.0'
implementation 'com.dgkncgty:logback-journal:0.5.0'
```

if you are using sbt, add this to your `build.sbt`
```scala
libraryDependencies += "com.dgkncgty" % "logback-journal" % "0.4.0"
libraryDependencies += "com.dgkncgty" % "logback-journal" % "0.5.0"
```

You also need the systemd journal library installed on your system to log to it.
Expand Down
30 changes: 29 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.dgkncgty</groupId>
<artifactId>logback-journal</artifactId>
<version>0.5.0-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>logback-journal</name>
Expand Down Expand Up @@ -41,6 +41,28 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.pinentry_mode>default</gpg.pinentry_mode>
<package.autoPublish>false</package.autoPublish>
<package.skipPublishing>true</package.skipPublishing>
</properties>
</profile>
<profile>
<id>gh-action</id>
<properties>
<gpg.pinentry_mode>loopback</gpg.pinentry_mode>
<package.autoPublish>true</package.autoPublish>
<package.skipPublishing>false</package.skipPublishing>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -82,6 +104,10 @@
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>${gpg.pinentry_mode}</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
Expand All @@ -93,6 +119,8 @@
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<skipPublishing>${package.skipPublishing}</skipPublishing>
<autoPublish>${package.autoPublish}</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
Expand Down

0 comments on commit dc1a71e

Please sign in to comment.