Skip to content

Commit 6f8e58b

Browse files
committed
update repo
1 parent 2dd6709 commit 6f8e58b

5 files changed

Lines changed: 209 additions & 70 deletions

File tree

.github/maven-settings.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- CI / local deploy settings for MasterSMP Reposilite (http://repo.mastersmp.net/).
3+
Credentials: REPOSILITE_USER + REPOSILITE_TOKEN env vars (or -Dreposilite.*).
4+
Overrides Maven's default HTTP blocker so the insecure Mastersmp URLs work. -->
5+
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
8+
<servers>
9+
<server>
10+
<id>mastersmp-releases</id>
11+
<username>${env.REPOSILITE_USER}</username>
12+
<password>${env.REPOSILITE_TOKEN}</password>
13+
</server>
14+
<server>
15+
<id>mastersmp-snapshots</id>
16+
<username>${env.REPOSILITE_USER}</username>
17+
<password>${env.REPOSILITE_TOKEN}</password>
18+
</server>
19+
</servers>
20+
<mirrors>
21+
<mirror>
22+
<id>maven-default-http-blocker</id>
23+
<mirrorOf>external:dont-match-anything-please:*</mirrorOf>
24+
<name>Disable default HTTP blocker for Mastersmp Reposilite</name>
25+
<url>http://0.0.0.0/</url>
26+
<blocked>false</blocked>
27+
</mirror>
28+
</mirrors>
29+
</settings>

.github/workflows/build.yml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,56 @@
11
name: Build
22

3-
on:
4-
release:
5-
types: [published]
6-
workflow_dispatch:
3+
on: [push, pull_request]
74

85
jobs:
96
build:
10-
117
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
1210

1311
steps:
14-
- uses: actions/checkout@v3
15-
- name: Set up JDK
16-
uses: actions/setup-java@v3
17-
with:
18-
java-version: '25'
19-
distribution: 'temurin'
20-
cache: maven
21-
server-id: central
22-
server-username: CENTRAL_USERNAME
23-
server-password: CENTRAL_TOKEN
24-
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
25-
gpg-passphrase: GPG_PASSPHRASE
26-
27-
- name: Initialize Paper NMS
28-
run: for file in $(grep -l '<artifactId>paper-nms</artifactId>' $(find -name 'pom.xml')); do mvn -B paper-nms:init --file "$file"; done
29-
30-
- name: Build the dependencies of the api
31-
run: mvn -B install --file pom.xml -pl '!api'
32-
33-
- name: Build and deploy the api
34-
working-directory: ./api
35-
run: mvn -B deploy --file pom.xml
36-
env:
37-
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
38-
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
39-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up JDK 21 and 25
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: temurin
18+
java-version: |
19+
21
20+
25
21+
cache: maven
22+
23+
- name: Initialize Paper NMS
24+
run: |
25+
for file in $(grep -l '<artifactId>paper-nms</artifactId>' $(find . -name 'pom.xml')); do
26+
mvn -B paper-nms:init --file "$file"
27+
done
28+
29+
- name: Build
30+
run: mvn -B install --file pom.xml -DskipTests
31+
32+
- name: Upload SignGUI jar
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: signgui-build
36+
path: api/target/signgui-*.jar
37+
if-no-files-found: error
38+
39+
- name: Publish snapshot to Reposilite
40+
if: github.event_name == 'push'
41+
run: |
42+
VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version --file pom.xml)
43+
echo "Project version: $VERSION"
44+
if [[ "$VERSION" != *-SNAPSHOT ]]; then
45+
echo "Not a SNAPSHOT version — skipping snapshot publish."
46+
exit 0
47+
fi
48+
if [ -z "${REPOSILITE_USER}" ] || [ -z "${REPOSILITE_TOKEN}" ]; then
49+
echo "Missing REPOSILITE_USER / REPOSILITE_TOKEN secrets."
50+
exit 1
51+
fi
52+
mvn -B deploy --file pom.xml -pl api -am -DskipTests \
53+
--settings .github/maven-settings.xml
54+
env:
55+
REPOSILITE_USER: ${{ secrets.REPOSILITE_USER }}
56+
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Git tag to create/publish (e.g. v2.5.4). Leave empty to use project version."
8+
required: false
9+
default: ""
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
name: Publish Release
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up JDK 21 and 25
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: temurin
29+
java-version: |
30+
21
31+
25
32+
cache: maven
33+
34+
- name: Resolve version / tag
35+
id: meta
36+
run: |
37+
PROJECT_VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version --file pom.xml)
38+
TAG_INPUT="${{ github.event.inputs.tag }}"
39+
if [ -n "$TAG_INPUT" ]; then
40+
TAG="$TAG_INPUT"
41+
else
42+
TAG="v${PROJECT_VERSION}"
43+
fi
44+
echo "version=${PROJECT_VERSION}" >> "$GITHUB_OUTPUT"
45+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
46+
echo "Resolved tag=${TAG} version=${PROJECT_VERSION}"
47+
48+
- name: Initialize Paper NMS
49+
run: |
50+
for file in $(grep -l '<artifactId>paper-nms</artifactId>' $(find . -name 'pom.xml')); do
51+
mvn -B paper-nms:init --file "$file"
52+
done
53+
54+
- name: Build publishable artifacts
55+
run: mvn -B clean install --file pom.xml -DskipTests
56+
57+
- name: Publish release to Reposilite
58+
run: |
59+
if [ -z "${REPOSILITE_USER}" ] || [ -z "${REPOSILITE_TOKEN}" ]; then
60+
echo "Missing REPOSILITE_USER / REPOSILITE_TOKEN secrets."
61+
exit 1
62+
fi
63+
mvn -B deploy --file pom.xml -pl api -am -DskipTests \
64+
--settings .github/maven-settings.xml
65+
env:
66+
REPOSILITE_USER: ${{ secrets.REPOSILITE_USER }}
67+
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}
68+
69+
- name: Create GitHub release
70+
uses: softprops/action-gh-release@v2
71+
with:
72+
tag_name: ${{ steps.meta.outputs.tag }}
73+
name: ${{ steps.meta.outputs.tag }}
74+
generate_release_notes: true
75+
files: |
76+
api/target/signgui-*.jar

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# SignGUI [![Build](https://github.com/Rapha149/SignGUI/actions/workflows/build.yml/badge.svg)](https://github.com/Rapha149/SignGUI/actions/workflows/build.yml) [![Maven Central](https://img.shields.io/maven-central/v/de.rapha149.signgui/signgui?label=Maven%20Central)](https://central.sonatype.com/artifact/de.rapha149.signgui/signgui) [![Javadoc](https://javadoc.io/badge2/de.rapha149.signgui/signgui/Javadoc.svg)](https://javadoc.io/doc/de.rapha149.signgui/signgui)
1+
# SignGUI [![Build](https://github.com/OPmasterLEO/SignGUI/actions/workflows/build.yml/badge.svg)](https://github.com/OPmasterLEO/SignGUI/actions/workflows/build.yml)
22
An api to get input text via a sign in Minecraft.
33
The api supports the Minecraft versions from `1.8` to `26.2`.
44
Also supports adventure text and mojang-mapped Paper plugins (1.20.5+).
55

6+
Distributed via [Reposilite](http://repo.mastersmp.net/).
7+
68
## ✨ Full Platform Support
79
-**Bukkit / Spigot / Paper** - Full support
810
-**Folia** - Complete regionized multithreading support
@@ -13,15 +15,47 @@ SignGUI automatically detects your server platform and uses the appropriate sche
1315

1416
## Integration
1517

16-
Maven dependency:
18+
Add the MasterSMP repo, then depend on SignGUI:
19+
20+
**Maven**
1721
```xml
22+
<repositories>
23+
<repository>
24+
<id>mastersmp</id>
25+
<url>http://repo.mastersmp.net/releases</url>
26+
</repository>
27+
</repositories>
28+
1829
<dependency>
1930
<groupId>de.rapha149.signgui</groupId>
2031
<artifactId>signgui</artifactId>
2132
<version>2.5.4</version>
2233
</dependency>
2334
```
2435

36+
**Gradle Kotlin**
37+
```kotlin
38+
repositories {
39+
mavenCentral()
40+
maven {
41+
url = uri("http://repo.mastersmp.net/releases")
42+
isAllowInsecureProtocol = true
43+
}
44+
}
45+
46+
dependencies {
47+
implementation("de.rapha149.signgui:signgui:2.5.4")
48+
}
49+
```
50+
51+
**Publish (maintainers only)**
52+
```bash
53+
# Release → http://repo.mastersmp.net/releases
54+
mvn deploy -pl api -am --settings .github/maven-settings.xml
55+
56+
# Requires REPOSILITE_USER + REPOSILITE_TOKEN
57+
```
58+
2559
In order to avoid conflicts with other plugins that also use this api, relocate the package in your maven shade plugin:
2660
```xml
2761
<build>

api/pom.xml

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@
1414

1515
<name>${project.groupId}:signgui</name>
1616
<description>An api to get input text via a sign in Minecraft.</description>
17-
<url>https://github.com/Rapha149/SignGUI</url>
17+
<url>https://github.com/OPmasterLEO/SignGUI</url>
1818

1919
<developers>
2020
<developer>
2121
<name>Rapha149</name>
2222
<email>rapha@rapha149.de</email>
2323
<url>https://github.com/Rapha149</url>
2424
</developer>
25+
<developer>
26+
<id>opmasterleo</id>
27+
<name>OPmasterLEO</name>
28+
<url>https://github.com/OPmasterLEO</url>
29+
</developer>
2530
</developers>
2631

2732
<licenses>
@@ -32,9 +37,9 @@
3237
</licenses>
3338

3439
<scm>
35-
<connection>scm:git:git://github.com/Rapha149/SignGUI.git</connection>
36-
<developerConnection>scm:git:ssh://github.com:Rapha149/SignGUI.git</developerConnection>
37-
<url>http://github.com/Rapha149/SignGUI/tree/main</url>
40+
<connection>scm:git:git://github.com/OPmasterLEO/SignGUI.git</connection>
41+
<developerConnection>scm:git:ssh://github.com:OPmasterLEO/SignGUI.git</developerConnection>
42+
<url>https://github.com/OPmasterLEO/SignGUI</url>
3843
</scm>
3944

4045
<dependencies>
@@ -409,27 +414,6 @@
409414
</execution>
410415
</executions>
411416
</plugin>
412-
<plugin>
413-
<groupId>org.apache.maven.plugins</groupId>
414-
<artifactId>maven-gpg-plugin</artifactId>
415-
<version>3.1.0</version>
416-
<executions>
417-
<execution>
418-
<id>sign-artifacts</id>
419-
<phase>verify</phase>
420-
<goals>
421-
<goal>sign</goal>
422-
</goals>
423-
<configuration>
424-
<!-- Prevent gpg from using pinentry programs -->
425-
<gpgArguments>
426-
<arg>--pinentry-mode</arg>
427-
<arg>loopback</arg>
428-
</gpgArguments>
429-
</configuration>
430-
</execution>
431-
</executions>
432-
</plugin>
433417
<plugin>
434418
<groupId>org.codehaus.mojo</groupId>
435419
<artifactId>flatten-maven-plugin</artifactId>
@@ -438,15 +422,13 @@
438422
<flattenMode>oss</flattenMode>
439423
</configuration>
440424
<executions>
441-
<!-- enable flattening -->
442425
<execution>
443426
<id>flatten</id>
444427
<phase>process-resources</phase>
445428
<goals>
446429
<goal>flatten</goal>
447430
</goals>
448431
</execution>
449-
<!-- ensure proper cleanup -->
450432
<execution>
451433
<id>flatten.clean</id>
452434
<phase>clean</phase>
@@ -456,16 +438,6 @@
456438
</execution>
457439
</executions>
458440
</plugin>
459-
<plugin>
460-
<groupId>org.sonatype.central</groupId>
461-
<artifactId>central-publishing-maven-plugin</artifactId>
462-
<version>0.1.2</version>
463-
<extensions>true</extensions>
464-
<configuration>
465-
<publishingServerId>central</publishingServerId>
466-
<tokenEnabled>true</tokenEnabled>
467-
</configuration>
468-
</plugin>
469441
<plugin>
470442
<groupId>org.apache.maven.plugins</groupId>
471443
<artifactId>maven-compiler-plugin</artifactId>
@@ -476,4 +448,15 @@
476448
</plugin>
477449
</plugins>
478450
</build>
451+
452+
<distributionManagement>
453+
<repository>
454+
<id>mastersmp-releases</id>
455+
<url>http://repo.mastersmp.net/releases</url>
456+
</repository>
457+
<snapshotRepository>
458+
<id>mastersmp-snapshots</id>
459+
<url>http://repo.mastersmp.net/snapshots</url>
460+
</snapshotRepository>
461+
</distributionManagement>
479462
</project>

0 commit comments

Comments
 (0)