-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (37 loc) · 1.16 KB
/
build.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
name: class-obf build
on:
workflow_dispatch:
env:
VERSION: "1.3.1"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: checkout the source
uses: actions/checkout@v4
with:
path: class-obf
- name: set up java 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: set up maven
run: |
wget https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
tar -xzf apache-maven-3.9.9-bin.tar.gz
sudo mv apache-maven-3.9.9 /opt/maven
echo "export M2_HOME=/opt/maven" >> ~/.bashrc
echo "export PATH=\$M2_HOME/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
- name: build core
run: |
mvn -B clean package -DskipTests --file pom.xml
mv target/class-obf-${{ env.VERSION }}-jar-with-dependencies.jar class-obf-${{ env.VERSION }}.jar
working-directory: class-obf
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: class-obf
path: |
class-obf/class-obf-${{ env.VERSION }}.jar