diff --git a/workflow-templates/maven.properties.json b/workflow-templates/maven.properties.json new file mode 100644 index 0000000..1bd6d98 --- /dev/null +++ b/workflow-templates/maven.properties.json @@ -0,0 +1,11 @@ +{ + "name": "Build using Maven", + "description": "Build using Maven.", + "iconName": "maven", + "categories": [ + "Maven POM" + ], + "filePatterns": [ + "pom.xml$" + ] +} diff --git a/workflow-templates/maven.svg b/workflow-templates/maven.svg new file mode 100644 index 0000000..55a27a5 --- /dev/null +++ b/workflow-templates/maven.svg @@ -0,0 +1,1264 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml new file mode 100644 index 0000000..3c5048f --- /dev/null +++ b/workflow-templates/maven.yml @@ -0,0 +1,34 @@ +# Builds using maven +# Pass the arguments you wish to run to maven_commands variable, default command will be mvn install +--- +name: Maven + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + strategy: + matrix: + java: [1.8, 11] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + env: + maven_commands: install # default is install + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build + run: mvn ${{ env.maven_commands }}