2023-06-28 16:58:52 +02:00
|
|
|
name: Building JAR
|
2023-09-02 20:26:12 +02:00
|
|
|
on: [workflow_dispatch, push]
|
2023-06-28 16:58:23 +02:00
|
|
|
jobs:
|
|
|
|
gradle:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-28 17:00:11 +02:00
|
|
|
os: [ubuntu-latest]
|
2023-06-28 16:58:23 +02:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-06-28 19:06:07 +02:00
|
|
|
- id: commit
|
|
|
|
uses: pr-mpt/actions-commit-hash@v2
|
|
|
|
- name: Get branch name
|
|
|
|
id: branch-name
|
|
|
|
uses: tj-actions/branch-names@v6
|
2023-06-28 16:58:23 +02:00
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-06-28 17:00:11 +02:00
|
|
|
java-version: 8
|
2023-06-28 16:58:23 +02:00
|
|
|
|
2024-07-17 16:10:38 +02:00
|
|
|
- name: Building Jar with Libraries
|
|
|
|
working-directory: ./autobuilder
|
|
|
|
run: npm install && LOGIN=${{ secrets.LOGIN }} PASSWORD=${{ secrets.PASSWORD }} node index --version 1.8.9 --branch ${{ steps.branch-name.outputs.current_branch }} --commit ${{ steps.commit.outputs.short }}
|
|
|
|
|
2023-06-28 16:58:23 +02:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
|
|
|
|
- name: Execute Gradle build
|
2023-06-28 19:06:07 +02:00
|
|
|
run: ./gradlew setupDecompWorkspace clean build --refresh-dependencies
|
|
|
|
|
2023-07-08 09:15:54 +02:00
|
|
|
- name: Copying JAR to AutoBuilder
|
2023-07-07 16:58:37 +02:00
|
|
|
working-directory: ./autobuilder
|
2023-07-08 09:15:54 +02:00
|
|
|
run: mkdir ./jars && cp ../build/libs/client-1.8.9.jar ./jars/Client.jar
|
|
|
|
|
|
|
|
# - name: Obfuscating Jar
|
|
|
|
# working-directory: ./autobuilder
|
|
|
|
# run: mkdir ./jars && java -jar obfuscator.jar --jarIn ../build/libs/client-1.8.9.jar --jarOut ./jars/Client.jar --scriptFile obfuscationScript.js --config config
|