Build #30
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: Build | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setting up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 8 | |
id: setup-jdk8 | |
- name: Setting up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
id: setup-jdk17 | |
- name: Grant permissions | |
run: sudo chmod -R 777 Builder/ | |
- name: build Builder | |
run: | | |
sudo mkdir Builder/build | |
sudo javac -cp "Builder/libs/asm-9.7.jar:Builder/libs/asm-analysis-9.7.jar:Builder/libs/asm-commons-9.7.jar:Builder/libs/asm-tree-9.7.jar:Builder/libs/asm-util-9.7.jar:Builder/libs/proguard.jar" -d Builder/build Builder/src/cn/yapeteam/builder/Builder.java Builder/src/cn/yapeteam/builder/OS.java Builder/src/cn/yapeteam/builder/Compiler.java Builder/src/cn/yapeteam/builder/Terminal.java Builder/src/cn/yapeteam/builder/ProcessBar.java Builder/src/cn/yapeteam/builder/SSLUtils.java | |
mkdir temp_dir | |
cd temp_dir | |
for jarfile in ../Builder/libs/*.jar; do | |
sudo jar xf "$jarfile" | |
done | |
cd .. | |
sudo jar cvfm builder.jar Builder/src/META-INF/MANIFEST.MF -C Builder/build/ . -C temp_dir/ . | |
- name: build deps | |
run: sudo java -jar builder.jar release deps ${{ steps.setup-jdk8.outputs.path }}/bin/javac | |
- name: build 1.8.9 | |
run: sudo java -jar builder.jar release 1.8.9 ${{ steps.setup-jdk8.outputs.path }}/bin/javac | |
- name: build 1.12.2 | |
run: sudo java -jar builder.jar release 1.12.2 ${{ steps.setup-jdk8.outputs.path }}/bin/javac | |
- name: build 1.18.1 | |
run: sudo java -jar builder.jar release 1.18.1 ${{ steps.setup-jdk17.outputs.path }}/bin/javac | |
- name: pack | |
run: sudo java -jar builder.jar release | |
- name: Grant permissions | |
run: sudo chmod -R 777 build/injector.jar | |
- name: Upload JAR to Release | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: build/injector.jar | |
asset_name: injector.jar | |
asset_content_type: application/java-archive |