SLC-1.8.9/.github/workflows/build.yml
2024-07-17 19:40:38 +05:30

38 lines
1.3 KiB
YAML

name: Building JAR
on: [workflow_dispatch, push]
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- 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 }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: ./gradlew setupDecompWorkspace clean build --refresh-dependencies
- name: Copying JAR to AutoBuilder
working-directory: ./autobuilder
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