Skip to content

Commit

Permalink
Fix the workflow (#18)
Browse files Browse the repository at this point in the history
* Update version
  • Loading branch information
hiwakaba authored Nov 15, 2024
1 parent fa2292d commit 1d7bc2b
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 11 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}

- name: Configure GPG Key
run: |
export GPG_TTY=$(tty)
echo -n "$GPG_SIGNING_KEY" | gpg --import --batch
env:
GPG_SIGNING_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
- name: List of keys on gpg
run: gpg --list-secret-keys --keyid-format LONG
- name: Set environments
run: |
echo "COMMON_MAVEN_OPTS=-Dmaven.compiler.failOnWarning=true -Dmaven.compiler.showDeprecation=true -Dmaven.compiler.verbose=true -Dmaven.compiler.debuglevel=lines,vars,source" >> "$GITHUB_ENV"
Expand All @@ -52,11 +59,17 @@ jobs:
if: "matrix.java == '8'"
run: |
mvn ${{ env.COMMON_MAVEN_OPTS }} -Dmaven.compiler.target=8 package
env:
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Run package on version other than 8
if: "matrix.java != '8'"
run: |
mvn ${{ env.COMMON_MAVEN_OPTS }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.release=${{ matrix.java }} package
env:
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Run javadoc
run: |
Expand Down
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
k2hash-java (1.0.7) stable; urgency=low

* Maven Central Repository migration
* Update document

-- Hirotaka Wakabayashi <[email protected]> Thu, 30 Nov 2023 13:57:40 +0900

k2hash-java (1.0.6) stable; urgency=low

* Updated the SonaType configurations
Expand Down
4 changes: 2 additions & 2 deletions k2hash/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>ax.antpick</groupId>
<artifactId>k2hash-parent</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
</parent>

<artifactId>k2hash</artifactId>
<packaging>jar</packaging>
<version>1.0.6</version>
<version>1.0.7</version>

<name>k2hash library</name>
<description>An official java driver for k2hash, which is a highly available and scalable distributed KVS library.</description>
Expand Down
71 changes: 63 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<packaging>pom</packaging>
<artifactId>k2hash-parent</artifactId>
<name>k2hash</name>
<version>1.0.6</version>
<version>1.0.7</version>
<description>An official java driver for k2hash, which is a highly available and scalable distributed KVS library.</description>
<url>https://github.com/yahoojapan/k2hash_java</url>

Expand Down Expand Up @@ -82,21 +82,23 @@
<javassist.version>3.29.2-GA</javassist.version>
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<!-- https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release -->
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven-project-info-reports-plugin.version>3.4.5</maven-project-info-reports-plugin.version>
<maven-site-plugin.version>4.0.0-M9</maven-site-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-site-plugin.version>4.0.0-M14</maven-site-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
<versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
<site-maven-plugin.version>0.12</site-maven-plugin.version>
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
<junit-jupiter-api.version>5.10.0</junit-jupiter-api.version>
<checkstyle.configLocation>checkstyle.xml</checkstyle.configLocation>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -174,7 +176,13 @@
<goals>
<goal>site</goal>
</goals>
<phase>site</phase>
<!-- select the Maven phase in which the plugin will be executed -->
<phase>site-deploy</phase>
<configuration>
<server>github</server>
<message>Building site for my project</message>
<merge>true</merge>
</configuration>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -221,6 +229,53 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
<executions>
<execution>
<id>default</id>
<goals>
<goal>perform</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down

0 comments on commit 1d7bc2b

Please sign in to comment.