diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..3162955
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,38 @@
+name: Build
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+permissions:
+ contents: read
+
+concurrency:
+ group: build-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '21'
+ cache: maven
+
+ - name: Build with Maven
+ run: mvn -B --no-transfer-progress package
+
+ - name: Upload JAR
+ uses: actions/upload-artifact@v4
+ with:
+ name: SMP-jar
+ path: target/*.jar
+ if-no-files-found: error
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..119abac
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,43 @@
+name: Release
+
+on:
+ push:
+ tags: ['release-*']
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: '21'
+ cache: maven
+
+ - name: Verify tag matches pom.xml version
+ run: |
+ POM_VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)
+ TAG_VERSION="${GITHUB_REF_NAME#release-}"
+ echo "pom.xml version: $POM_VERSION"
+ echo "Tag version: $TAG_VERSION"
+ if [ "$POM_VERSION" != "$TAG_VERSION" ]; then
+ echo "::error::Tag '$GITHUB_REF_NAME' does not match pom.xml version '$POM_VERSION'"
+ exit 1
+ fi
+
+ - name: Build with Maven
+ run: mvn -B --no-transfer-progress package
+
+ - name: Publish Release
+ uses: softprops/action-gh-release@v2
+ with:
+ files: target/*.jar
+ generate_release_notes: true
+ fail_on_unmatched_files: true
diff --git a/pom.xml b/pom.xml
index 8e30015..94e05d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
papermc
- https://papermc.io/repo/repository/maven-public/
+ https://repo.papermc.io/repository/maven-public/