Skip to content

Commit

Permalink
Merge pull request #8 from Inder00/feature/github-actions-ci
Browse files Browse the repository at this point in the history
Github CI build
  • Loading branch information
arthurr0 authored Nov 6, 2021
2 parents 1bf77f4 + df35292 commit a1d1001
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Java CI with Maven
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 16]
name: Build on JDK ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: '${{ matrix.java }}'
distribution: 'adopt'
- name: Cache the Maven packages to speed up build
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B clean package --file pom.xml
- name: Create artifact
uses: 'actions/upload-artifact@v2'
with:
name: "${{ github.sha }}-JDK${{ matrix.java }}"
path: '${{ GITHUB.WORKSPACE }}/target/mineEconomy-*.jar'
if-no-files-found: error

0 comments on commit a1d1001

Please sign in to comment.