aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2023-10-27 21:52:11 -0700
committerPinapelz <yukais@pinapelz.com>2023-10-27 21:52:11 -0700
commitf89590eeaa618233403555e2a99cb937911ee758 (patch)
tree79eb1c950d6d98d9238b1314d8effa8bc4c0fa91
parent2ccf0233fa58596f548844788810088275d00fce (diff)
update pom.xml
-rw-r--r--.github/workflows/publish.yml14
-rw-r--r--pom.xml67
2 files changed, 70 insertions, 11 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 3d5fe17..19bdeac 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -1,4 +1,4 @@
-name: Publish package to GitHub Packages
+name: Publish package to the Maven Central Repository
on:
workflow_dispatch:
release:
@@ -6,16 +6,18 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-java@v3
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
diff --git a/pom.xml b/pom.xml
index 0ec3607..27359d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,10 +33,13 @@
</scm>
<distributionManagement>
<repository>
- <id>github</id>
- <name>GitHub Packages</name>
- <url>https://maven.pkg.github.com/pinapelz/JHolodex</url>
+ <id>ossrh</id>
+ <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
+ <snapshotRepository>
+ <id>ossrh</id>
+ <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
+ </snapshotRepository>
</distributionManagement>
<dependencies>
<dependency>
@@ -70,8 +73,62 @@
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
-
-
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</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-source-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9.1</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage