4 Commits

Author SHA1 Message Date
KartoffelChipss de3d170347 Fix Maven deployment repository syntax
Deploy to Maven Repository / deploy (release) Failing after 10m9s
2026-11-01 20:02:45 +01:00
KartoffelChipss d7012e0ddd Version bump
Deploy to Maven Repository / deploy (release) Failing after 11m56s
2026-11-01 19:52:53 +01:00
KartoffelChipss 173c21d346 Adjust release workflow for new repo 2026-11-01 19:49:45 +01:00
KartoffelChipss 3fa4e518ac Update config table in README 2026-05-24 22:58:27 +02:00
3 changed files with 24 additions and 72 deletions
+10 -59
View File
@@ -18,72 +18,23 @@ jobs:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
# Writes a <server id="smr"> entry to ~/.m2/settings.xml that reads the credentials from these env vars
server-id: smr
server-username: MAVEN_DEPLOY_USER
server-password: MAVEN_DEPLOY_TOKEN
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Get release version
id: get_version
run: echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Set version from release tag
run: mvn -B versions:set -DnewVersion="${{ github.event.release.tag_name }}" -DgenerateBackupPoms=false
- name: Build plugin
run: mvn -B -U -C clean package -DskipTests
- name: Extract Maven coordinates
id: meta
- name: Build and deploy
env:
MAVEN_DEPLOY_USER: ${{ vars.MAVEN_DEPLOY_USER }}
MAVEN_DEPLOY_TOKEN: ${{ secrets.MAVEN_DEPLOY_TOKEN }}
run: |
echo "groupId=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)" >> $GITHUB_OUTPUT
echo "artifactId=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_OUTPUT
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.MVN_REPO_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.MVN_REPO_SSH_HOST }} >> ~/.ssh/known_hosts
- name: Generate checksums
run: |
ARTIFACT_ID=${{ steps.meta.outputs.artifactId }}
VERSION=${{ steps.meta.outputs.version }}
JAR_FILE=target/$ARTIFACT_ID-$VERSION.jar
POM_FILE=target/$ARTIFACT_ID-$VERSION.pom
cp pom.xml $POM_FILE
for file in $JAR_FILE $POM_FILE; do
sha1sum "$file" | awk '{ print $1 }' > "$file.sha1"
md5sum "$file" | awk '{ print $1 }' > "$file.md5"
done
- name: Upload artifact and checksums to VPS
run: |
GROUP_PATH=$(echo "${{ steps.meta.outputs.groupId }}" | sed 's/\./\//g')
ARTIFACT_ID=${{ steps.meta.outputs.artifactId }}
VERSION=${{ steps.meta.outputs.version }}
REMOTE_DIR="${{ secrets.REMOTE_MAVEN_PATH }}/$GROUP_PATH/$ARTIFACT_ID/$VERSION"
echo "Creating remote directory: $REMOTE_DIR"
ssh ${{ secrets.MVN_REPO_SSH_USER }}@${{ secrets.MVN_REPO_SSH_HOST }} "mkdir -p $REMOTE_DIR"
FILES=(
"target/$ARTIFACT_ID-$VERSION.jar"
"target/$ARTIFACT_ID-$VERSION.jar.sha1"
"target/$ARTIFACT_ID-$VERSION.jar.md5"
"target/$ARTIFACT_ID-$VERSION.pom"
"target/$ARTIFACT_ID-$VERSION.pom.sha1"
"target/$ARTIFACT_ID-$VERSION.pom.md5"
)
echo "Uploading files..."
for file in "${FILES[@]}"; do
echo "Uploading $file"
scp "$file" ${{ secrets.MVN_REPO_SSH_USER }}@${{ secrets.MVN_REPO_SSH_HOST }}:$REMOTE_DIR/
done
mvn -B -U clean deploy -DskipTests \
-DaltDeploymentRepository=smr::default::${{ vars.MAVEN_REPO_URL }}
+13 -12
View File
@@ -62,19 +62,20 @@ This will:
All options go inside the `<configuration>` block of the plugin declaration.
| Option | Default | Description |
|---|---|---------------------------------------------------------------------------------------------------------------------------------|
| `mcVersion` | *(required)* | The Minecraft version to run, e.g. `1.21.4` |
| Option | Default | Description |
|---|---|---|
| `mcVersion` | *(required)* | The Minecraft version to run, e.g. `1.21.4` |
| `acceptEula` | `false` | Automatically accept the [Minecraft EULA](https://aka.ms/MinecraftEULA). By setting this to `true` you confirm your acceptance. |
| `serverSoftware` | `paper` | Server software to use. Supported values: `paper`, `spigot` |
| `serverDirectory` | `./server` | Folder where the server files will be created |
| `serverJarName` | `server.jar` | File name for the server jar inside `serverDirectory` |
| `memory` | `2G` | RAM allocated to the server (used for both `-Xmx` and `-Xms`), e.g. `2G`, `512M` |
| `port` | *(Minecraft default)* | Port the server listens on |
| `remoteDebug` | `false` | Enable remote JVM debugging so you can attach your IDE's debugger |
| `debugPort` | `5005` | Port used for remote debugging (only relevant if `remoteDebug` is `true`) |
| `jvmArgs` | *(none)* | Extra JVM flags passed to the server process (see below) |
| `pluginJar` | *(your built jar)* | Path to the plugin jar to deploy. You rarely need to change this |
| `serverSoftware` | `paper` | Server software to use. Supported values: `paper`, `spigot` |
| `serverDirectory` | `./server` | Folder where the server files will be created |
| `serverJarName` | `server.jar` | File name for the server jar inside `serverDirectory` |
| `minMemory` | `512M` | Minimum RAM allocated to the server (`-Xms`), e.g. `512M`, `1G` |
| `maxMemory` | `2G` | Maximum RAM allocated to the server (`-Xmx`), e.g. `2G`, `4G` |
| `port` | *(Minecraft default)* | Port the server listens on |
| `remoteDebug` | `false` | Enable remote JVM debugging so you can attach your IDE's debugger |
| `debugPort` | `5005` | Port used for remote debugging (only relevant if `remoteDebug` is `true`) |
| `jvmArgs` | *(none)* | Extra JVM flags passed to the server process |
| `pluginJar` | *(your built jar)* | Path to the plugin jar to deploy. You rarely need to change this |
### Full configuration example
+1 -1
View File
@@ -7,7 +7,7 @@
<groupId>org.strassburger</groupId>
<artifactId>mcrun-maven-plugin</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>maven-plugin</packaging>
<name>MCRun Maven Plugin</name>