-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.33 KB
/
maven-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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