Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,30 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [7, 8, 11]
java: [8, 11]

steps:
- uses: actions/checkout@v2

- name: Install Maven 3.8.x (instead of 3.9.x)
run: |
MAVEN_VERSION=3.8.9
wget https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
tar xzvf apache-maven-$MAVEN_VERSION-bin.tar.gz
sudo mv apache-maven-$MAVEN_VERSION /opt/maven
sudo rm -f /usr/bin/mvn # Remove existing symbolic link if it exists
sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn # Create new symbolic link

# - name: Install Maven 3.8.x (instead of 3.9.x)
# run: |
# MAVEN_VERSION=3.8.9
# wget https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
# tar xzvf apache-maven-$MAVEN_VERSION-bin.tar.gz
# sudo mv apache-maven-$MAVEN_VERSION /opt/maven
# sudo rm -f /usr/bin/mvn # Remove existing symbolic link if it exists
# sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn # Create new symbolic link

# - name: Setup java
# uses: actions/setup-java@v1
# with:
# java-version: ${{ matrix.java }}
- name: Setup java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'

- name: Cache Maven packages
uses: actions/cache@v4
Expand All @@ -45,4 +51,4 @@ jobs:
node-version: 14.x

- name: Run the Maven verify phase
run: mvn verify -Dgpg.skip=true
run: mvn verify -Dgpg.skip=true --no-transfer-progress
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish to Maven Central

on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
description: 'Version to publish'
required: false

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SIGNING_KEY }}
gpg-passphrase: SIGNING_PASSWORD

- name: Set version (if provided)
if: github.event.inputs.version != ''
run: |
mvn versions:set -DnewVersion=${{ github.event.inputs.version }} -DgenerateBackupPoms=false

- name: Build and publish
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
mvn clean deploy \
--no-transfer-progress \
--batch-mode \
# -DskipTests \
# -Dgpg.keyname=${{ secrets.SIGNING_KEY_ID }} \
# -Dgpg.passphrase=${{ secrets.SIGNING_PASSWORD }} \
# -Dgpg.pinentry-mode=loopback \
59 changes: 45 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.socket</groupId>
<groupId>io.github.robinpcrd</groupId>
<artifactId>socket.io-client</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.0</version>
<packaging>jar</packaging>
<name>socket.io-client</name>
<description>Socket.IO Client Library for Java</description>
<url>https://github.com/socketio/socket.io-client-java</url>
<description>Socket.IO Client Library for Java (Fork)</description>
<url>https://github.com/RobinPcrd/socket.io-client-java</url>

<!--
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
-->

<properties>
<github.global.server>github</github.global.server>
Expand All @@ -27,9 +30,9 @@
</licenses>

<scm>
<url>https://github.com/socketio/socket.io-client-java</url>
<connection>scm:git:https://github.com/socketio/socket.io-client-java.git</connection>
<developerConnection>scm:git:https://github.com/socketio/socket.io-client-java.git</developerConnection>
<url>https://github.com/RobinPcrd/socket.io-client-java</url>
<connection>scm:git:https://github.com/RobinPcrd/socket.io-client-java.git</connection>
<developerConnection>scm:git:https://github.com/RobinPcrd/socket.io-client-java.git</developerConnection>
<tag>HEAD</tag>
</scm>

Expand All @@ -39,8 +42,14 @@
<name>Naoyuki Kanezawa</name>
<email>naoyuki.kanezawa@gmail.com</email>
</developer>
<developer>
<id>robinpcrd</id>
<name>Robin Picard</name>
<email>robin.picard.dev@gmail.com</email>
</developer>
</developers>

<!--
<repositories>
<repository>
<id>sonatype-oss-public</id>
Expand All @@ -53,9 +62,10 @@
</snapshots>
</repository>
</repositories>
-->

<prerequisites>
<maven>3.0.4</maven>
<maven>3.6.3</maven>
</prerequisites>

<dependencies>
Expand Down Expand Up @@ -89,16 +99,18 @@
</dependency>
</dependencies>

<!--
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>central</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>central</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
-->

<build>
<plugins>
Expand Down Expand Up @@ -129,6 +141,12 @@
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -167,17 +185,19 @@
<goals>deploy</goals>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<serverId>central</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down Expand Up @@ -247,6 +267,17 @@
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>uploaded</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading