diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..3ed2f9e --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,40 @@ +name: Maven Build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: 16 + distribution: 'adopt' + + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Build with Maven + uses: nick-invision/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 3 + command: mvn -B package --file pom.xml + + - name: Upload artifact + uses: actions/upload-artifact@v2.2.3 + with: + name: AuthmeVelocity + path: | + proxy/target/AuthMeVelocity-proxy.jar + spigot/target/AuthMeVelocity-spigot.jar \ No newline at end of file