Update Maven dependencies caching and remove Node.js setup in CI work… #51
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven Package | |
on: | |
push: | |
branches: | |
- master | |
- experimental | |
pull_request: | |
branches: | |
- master | |
- experimental | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
key: maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven- | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '8' | |
- name: Create Target Directory | |
run: mkdir -p target | |
- name: Build with Maven | |
run: mvn package --file ../pom.xml | |
working-directory: target | |
- name: Create filtered-artifacts | |
run: mkdir -p filtered-artifacts | |
- name: Filter and Upload JAR as an artifact | |
run: | | |
# Filter out files that start with 'Wauh' and upload the rest | |
find -type f -name Wauh*.jar -exec cp {} filtered-artifacts/ \; | |
- name: Upload JAR as an artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Wauh-${{ github.run_number }} | |
path: filtered-artifacts | |
if-no-files-found: error |