diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..5ab4dca
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "monthly"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b190db2..5cacbe0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,25 +8,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - name: Checkout Code
- uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- - name: Set Up Java
- uses: actions/setup-java@v2
+ - uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
+ cache: 'maven'
- # Use cache to speed up build
- - name: Cache Maven Repo
- uses: actions/cache@v2
- id: cache
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-
- # Install Spigot dependencies.
- # This script uses Maven to check all required installations and ensure that they are present.
+ # Install Spigot dependencies if necessary.
- name: Install Spigot Dependencies
run: . scripts/install_spigot_dependencies.sh
@@ -36,37 +26,69 @@ jobs:
# Upload artifacts
- name: Upload Distributable Jar
id: upload-final
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: dist
path: ./target/OpenInv.jar
- name: Upload API Jar
id: upload-api
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: api
path: ./api/target/openinvapi*.jar
+ merge-dependabot:
+ name: Auto-merge Dependabot PRs
+ needs: [ build ]
+ if: github.event.name == 'pull_request_target' && github.actor == 'dependabot[bot]'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ # Filter dependency changes based on path.
+ - uses: dorny/paths-filter@v2
+ id: changes
+ with:
+ filters: |
+ maven:
+ - '**/pom.xml'
+
+ # Only auto-merge Maven changes.
+ - if: steps.changes.outputs.maven == 'true'
+ name: Approve
+ uses: hmarr/auto-approve-action@v2.0.0
+ with:
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
+ - if: steps.changes.outputs.maven == 'true'
+ name: Merge
+ uses: pascalgn/automerge-action@v0.15.2
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ MERGE_LABELS: "dependencies"
+ MERGE_METHOD: "squash"
+
release:
name: Create Github Release
needs: [ build ]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- - name: Checkout Code
- uses: actions/checkout@v2
+ # Fetch all history - used to assemble changelog.
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Release Variables
run: bash ./scripts/set_release_env.sh
- - name: Download Artifacts
- uses: actions/download-artifact@v2
+ - name: Download Artifact
+ uses: actions/download-artifact@v3
+ with:
+ name: dist
+ path: dist
- name: Create Release
id: create-release
- uses: softprops/action-gh-release@v0.1.5
+ uses: softprops/action-gh-release@v0.1.14
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
diff --git a/internal/v1_17_R1/pom.xml b/internal/v1_17_R1/pom.xml
index f457607..427a208 100644
--- a/internal/v1_17_R1/pom.xml
+++ b/internal/v1_17_R1/pom.xml
@@ -43,10 +43,6 @@
${spigot.version}
remapped-mojang
-
- openinvapi
- com.lishid
-
openinvplugincore
com.lishid
@@ -61,7 +57,7 @@
maven-shade-plugin
-
+
false
diff --git a/internal/v1_18_R1/pom.xml b/internal/v1_18_R1/pom.xml
index 866cb58..3a62a7e 100644
--- a/internal/v1_18_R1/pom.xml
+++ b/internal/v1_18_R1/pom.xml
@@ -48,10 +48,6 @@
${spigot.version}
remapped-mojang
-
- openinvapi
- com.lishid
-
openinvplugincore
com.lishid
@@ -66,7 +62,7 @@
maven-shade-plugin
-
+
false
diff --git a/internal/v1_18_R2/pom.xml b/internal/v1_18_R2/pom.xml
index 75363dc..0a0f429 100644
--- a/internal/v1_18_R2/pom.xml
+++ b/internal/v1_18_R2/pom.xml
@@ -48,10 +48,6 @@
${spigot.version}
remapped-mojang
-
- openinvapi
- com.lishid
-
openinvplugincore
com.lishid
@@ -66,7 +62,7 @@
maven-shade-plugin
-
+
false
diff --git a/pom.xml b/pom.xml
index 6d17320..2ef3c9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,8 +27,8 @@
UTF-8
- 1.8
- 1.8
+ 16
+ 16
unknown
@@ -72,13 +72,13 @@
annotations
org.jetbrains
provided
- 21.0.1
+ 23.0.0
spigot-api
org.spigotmc
provided
- 1.16.5-R0.1-SNAPSHOT
+ 1.17.1-R0.1-SNAPSHOT
openinvapi
@@ -91,6 +91,12 @@
com.lishid
compile
4.1.11-SNAPSHOT
+
+
+ com.lishid
+ openinvapi
+
+
@@ -128,7 +134,7 @@
org.apache.maven.plugins
- 3.2.4
+ 3.3.0
@@ -146,7 +152,7 @@
net.md-5
specialsource-maven-plugin
- 1.2.2
+ 1.2.4
package