diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml
index 5de62b4..14cd490 100644
--- a/.github/workflows/maven-publish.yml
+++ b/.github/workflows/maven-publish.yml
@@ -1,30 +1,41 @@
-# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
-# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
-
-name: Maven Package
+name: Maven Deploy
on:
release:
- types: [created]
+ branches: [ main ]
jobs:
+
build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Maven build
+ run: mvn -B package --file pom.xml
+ deploy:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
- server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
- settings-path: ${{ github.workspace }} # location for the settings.xml file
-
- - name: Build with Maven
- run: mvn -B package --file pom.xml
-
- - name: Publish to GitHub Packages Apache Maven
- run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
- env:
- GITHUB_TOKEN: ${{ github.token }}
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Deploy to Github Package Registry
+ env:
+ GITHUB_USERNAME: ${{ github.BUKKIT_TIMER_USER }}
+ GITHUB_TOKEN: ${{ github.BUKKIT_TIMER_TOKEN }}
+ run: mvn --settings settings.xml --file pom.xml deploy
+
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 9c7a494..8337d41 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -15,16 +15,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
- - name: Build with Maven
- run: mvn -B package --file pom.xml
- - name: Create package
- run: mkdir staging && cp target/*.jar staging
- - uses: actions/upload-artifact@v2
- with:
- name: BukkitTimer
- path: staging
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+
+ - name: Build Maven Project
+ run: |
+ mvn -B package --file pom.xml
+ mkdir staging && cp target/*.jar staging
+
+ - name: Set up cache
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: Bukkit Timer
+ path: staging
diff --git a/pom.xml b/pom.xml
index f19eddc..30c218f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
fr.DevsCheese
- bukkitTimer
+ bukkit-timer
1.0-SNAPSHOT
jar
@@ -21,12 +21,47 @@
github
- Bukkit Timer
- https://maven.pkg.github.com/DevsCheese/Bukkit-timer
+ GitHub DevsCheese Apache Maven Packages
+ https://maven.pkg.github.com/DevsCheese/bukkit-timer
+
+
+ Devs Cheese
+ devs.cheese@gmail.com
+ com.github.devscheese
+ https://github.com/DevsCheese/Bukkit-timer
+
+
+
+
+ scm:git:git://github.com/DevsCheese/Bukkit-timer.git
+ scm:git:https://github.com/DevsCheese/Bukkit-timer.git
+ https://github.com/DevsCheese/Bukkit-timer
+ Bukkit-timer
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+ ${java.version}
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ 3.9.1
+
+
+
org.apache.maven.plugins
@@ -37,21 +72,11 @@
${java.version}
+
org.apache.maven.plugins
- maven-shade-plugin
- 3.2.4
-
-
- package
-
- shade
-
-
- false
-
-
-
+ maven-release-plugin
+ 3.0.0-M1