force single file publishing and add initial gh workflow for publishing ui

This commit is contained in:
LukeFZ
2025-01-25 16:22:33 +01:00
parent 1b6cf7c776
commit ee81375265
3 changed files with 48 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ name: Il2CppInspectorRedux Build
on: [push, workflow_dispatch] on: [push, workflow_dispatch]
jobs: jobs:
build-gui: build-redux-gui: # this already includes stuff only relevant for linux/macos for when the gui is released on those platforms
runs-on: windows-latest runs-on: windows-latest
steps: steps:
@@ -16,24 +16,62 @@ jobs:
with: with:
dotnet-version: '9.0.x' dotnet-version: '9.0.x'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Setup Tauri dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install frontend dependencies
run: pnpm install
working-directory: ./Il2CppInspector.Redux.GUI.UI
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: ~/.nuget/packages path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-gui-${{ hashFiles('**/packages.lock.json') }} key: ${{ runner.os }}-nuget-redux-gui-${{ hashFiles('**/packages.lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-nuget-gui- ${{ runner.os }}-nuget-redux-gui-
- name: Restore NuGet packages - name: Restore NuGet packages
run: dotnet restore -r win-x64 ./Il2CppInspector.GUI run: dotnet restore -r win-x64 ./Il2CppInspector.Redux.GUI
- name: Build GUI - name: Build GUI C# component
run: dotnet publish ./Il2CppInspector.GUI/Il2CppInspector.GUI.csproj -c Release -r win-x64 --no-self-contained run: dotnet publish ./Il2CppInspector.Redux.GUI/Il2CppInspector.Redux.GUI.csproj -r win-x64 --no-self-contained
- name: Build GUI TS component
run: pnpm tauri build --no-bundle
working-directory: ./Il2CppInspector.Redux.GUI.UI
- name: Copy components to output directory
run: |
mkdir ./build_output
mkdir ./build_output/resources
cp ./Il2CppInspector.Redux.GUI/bin/Release/net9.0/win-x64/publish/Il2CppInspector.Redux.GUI.exe ./build_output/
cp ./Il2CppInspector.Redux.GUI.UI/src-tauri/target/release/il2cppinspectorredux.exe ./build_output/resources/
- name: Upload GUI Artifact - name: Upload GUI Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Il2CppInspectorRedux.GUI name: Il2CppInspectorRedux.GUI
path: Il2CppInspector.GUI/bin/Release/net9.0-windows/win-x64/publish path: build_output
build-cli: build-cli:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -41,5 +41,6 @@
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"typescript": "~5.6.2", "typescript": "~5.6.2",
"vite": "^6.0.3" "vite": "^6.0.3"
} },
"packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b"
} }

View File

@@ -8,6 +8,7 @@
<PublishAot>false</PublishAot> <PublishAot>false</PublishAot>
<!-- todo: enable this once the app is aot compliant! --> <!-- todo: enable this once the app is aot compliant! -->
<OutputType Condition="'$(Configuration)' == 'Release'">WinExe</OutputType> <OutputType Condition="'$(Configuration)' == 'Release'">WinExe</OutputType>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>