v6.1.0 #14
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main, develop, feature/**] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| build-mod: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.x' | |
| - name: Build SFS_HAN_MOD (Native) | |
| run: dotnet build mod/SFS_HAN_MOD.csproj -c Release | |
| - name: Build SFS_FontFix (BepInEx) | |
| run: dotnet build mod/SFS_FontFix.csproj -c Release | |
| - name: Copy DLLs to tool assets | |
| run: | | |
| Copy-Item dist/SFS_HAN_MOD.dll tool/rust/assets/SFS_HAN_MOD.dll -Force | |
| Copy-Item dist/SFS_FontFix.dll tool/rust/assets/SFS_FontFix.dll -Force | |
| - name: Upload MOD artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mod-dlls | |
| path: dist/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Python syntax check | |
| run: python -c "import py_compile; py_compile.compile('tool/python/SFS_Chinese_Tool.py', doraise=True)" | |
| build-tool: | |
| needs: build-mod | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download MOD artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mod-dlls | |
| path: tool/rust/assets/ | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| cache: true | |
| - name: Build Rust tool | |
| run: cargo build --release | |
| working-directory: tool/rust | |
| - name: Package release | |
| run: | | |
| New-Item -ItemType Directory -Force -Path dist | |
| Copy-Item tool/rust/target/release/SFS_Language_TOOL.exe dist/ | |
| Copy-Item tool/rust/assets/NotoSansSC.ttf dist/ | |
| Copy-Item tool/rust/assets/SFS_HAN_MOD.dll dist/ | |
| Compress-Archive -Path dist/* -DestinationPath dist/SFS_Chinese_Tool.zip | |
| - name: Upload release artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: SFS_Chinese_Tool | |
| path: dist/SFS_Chinese_Tool.zip |