generated from MrSphay/codex-agent-repository-kit
Add decompile runner workflow
This commit is contained in:
52
.gitea/workflows/decompile.yml
Normal file
52
.gitea/workflows/decompile.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Decompile upstream jar
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
decompile:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
|
||||
- name: Download upstream mod and CFR
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p upstream tools build/decompiled
|
||||
curl --fail-with-body --location \
|
||||
--output upstream/Explosion-Overhaul-0.2.3.0-forge.jar \
|
||||
"https://cdn.modrinth.com/data/sOxnTLKl/versions/93XGK0uB/Explosion-Overhaul-0.2.3.0-forge-.jar"
|
||||
curl --fail-with-body --location \
|
||||
--output tools/cfr.jar \
|
||||
"https://www.benf.org/other/cfr/cfr-0.152.jar"
|
||||
|
||||
- name: Decompile
|
||||
shell: bash
|
||||
run: |
|
||||
java -jar tools/cfr.jar upstream/Explosion-Overhaul-0.2.3.0-forge.jar \
|
||||
--outputdir build/decompiled \
|
||||
--silent false \
|
||||
--comments false \
|
||||
--caseinsensitivefs true
|
||||
|
||||
- name: Copy metadata
|
||||
shell: bash
|
||||
run: |
|
||||
unzip -p upstream/Explosion-Overhaul-0.2.3.0-forge.jar META-INF/mods.toml > build/decompiled/mods.toml
|
||||
unzip -p upstream/Explosion-Overhaul-0.2.3.0-forge.jar explosionoverhaul.mixins.json > build/decompiled/explosionoverhaul.mixins.json
|
||||
find build/decompiled -maxdepth 3 -type f | sort > build/decompiled-file-list.txt
|
||||
|
||||
- name: Upload decompiled sources
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: explosion-overhaul-decompiled-0.2.3.0-forge
|
||||
path: |
|
||||
build/decompiled/**
|
||||
build/decompiled-file-list.txt
|
||||
Reference in New Issue
Block a user