diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..21d4334 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,38 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + - uses: actions/upload-artifact@v2 + with: + name: MobMortalityMessages (#${{ github.run_number }}) + path: target/*.jar + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file diff --git a/.gitignore b/.gitignore index a7ce426..5a27d46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,32 @@ -*.class -.classpath -.project -*.iml +# Eclipse stuff +/.classpath +/.project +/.settings + +# netbeans +/nbproject + +# we use maven! +build.xml + +# maven +/target -# Package Files # -*.jar -*.war -*.ear +# vim +.*.sw[a-p] -target/ -.settings/ -bin/ +# various other potential build files +build +bin +dist +manifest.mf +package + +# Mac filesystem dust +.DS_Store + +# intellij +*.iml +*.ipr +*.iws +.idea/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index b9fcad1..5ad5969 100644 --- a/pom.xml +++ b/pom.xml @@ -3,25 +3,27 @@ 4.0.0 im.wma.dev MobMortalityMessages - 1.2-SNAPSHOT + 1.3-SNAPSHOT jar UTF-8 - DD/MM/yyyy.HH:mm:ss - dev-${maven.build.timestamp} + yyyyMMdd.kkmmss + local-${maven.build.timestamp} ${project.version}-${BUILD_NUMBER} - bukkit-repo - http://repo.bukkit.org/content/groups/public + spigot + https://hub.spigotmc.org/nexus/content/groups/public/ + - org.bukkit - bukkit - LATEST + org.spigotmc + spigot-api + 1.20.2-R0.1-SNAPSHOT + provided MobMortalityMessages diff --git a/res/plugin.yml b/res/plugin.yml index cc0ef30..b2afc34 100644 --- a/res/plugin.yml +++ b/res/plugin.yml @@ -1,7 +1,8 @@ name: MobMortalityMessages -version: 1.0 +version: ${pluginversion} description: Sends a message to the attacking Player containing the Mob's remaining health author: Penguin +api-version: 1.20 main: im.wma.dev.MobMortalityMessages.MobMortalityMessages prefix: MMM commands: