workflow build #21
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: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
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 | |
sudo jar cvfm builder.jar Builder/src/META-INF/MANIFEST.MF -C Builder/build/ . | |
- 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 -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" -jar builder.jar release | |
- name: Upload artifact | |
run: | | |
cd build/libs | |
export JAR=$(find . 'injector.jar') | |
curl --connect-timeout 30 -m 300 -X POST -F "[email protected]" -H "Authorization: ${{ secrets.NIGHTLY_PASS }}" -F "gh_id=${{ github.event.head_commit.id }}" -F "gh_ref=${{ github.ref }}" -F "gh_message=${{ github.event.head_commit.message }}" -F "gh_timestamp=${{ github.event.head_commit.timestamp }}" |