Skip to content

Commit

Permalink
👷 Added CI, changed groupId to fr.skytasul
Browse files Browse the repository at this point in the history
  • Loading branch information
SkytAsul committed Jun 27, 2024
1 parent f033f34 commit 9aee5df
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 15 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Maven Build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- uses: s4u/maven-settings-action@v3.0.0
with:
servers: '[{"id": "central", "username": "${{ secrets.CENTRAL_USERNAME }}", "password": "${{ secrets.CENTRAL_PASSWORD }}"}]'

- name: Build with Maven
run: mvn -B package --file pom.xml
32 changes: 32 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Maven Publish

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- uses: s4u/maven-settings-action@v3.0.0
with:
servers: '[{"id": "central", "username": "${{ secrets.CENTRAL_USERNAME }}", "password": "${{ secrets.CENTRAL_PASSWORD }}"}]'

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to Maven Central
run: mvn deploy
31 changes: 16 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>io.github.skytasul</groupId>
<groupId>fr.skytasul</groupId>
<artifactId>glowingentities</artifactId>
<version>1.3.5</version>

Expand All @@ -28,7 +28,8 @@

<scm>
<connection>scm:git:git://github.com/SkytAsul/GlowingEntities.git</connection>
<developerConnection>scm:git:ssh://github.com:SkytAsul/GlowingEntities.git</developerConnection>
<developerConnection>
scm:git:ssh://github.com:SkytAsul/GlowingEntities.git</developerConnection>
<url>http://github.com/SkytAsul/GlowingEntities/tree/master</url>
</scm>

Expand Down Expand Up @@ -59,13 +60,13 @@
<version>4.1.68.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -111,14 +112,14 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.12</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.5.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 9aee5df

Please sign in to comment.