Short term/code optimization #312
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 | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- prereleased | |
- created | |
- published | |
- edited | |
jobs: | |
build: | |
runs-on: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
key: maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven- | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '21' | |
- name: Create Target Directory | |
run: mkdir -p target | |
- name: Build with Maven | |
run: mvn verify --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 target -type f -name Spigot-Admin-Toys*.jar -exec cp {} filtered-artifacts/ \; | |
- name: Upload JAR as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Wauh-${{ github.run_number }} | |
path: filtered-artifacts | |
if-no-files-found: error |