Enhance log timestamp format to include milliseconds in debug output #4
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: Build | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: write | |
| env: | |
| LAUNCHER_PATH: target\i686-win7-windows-msvc\release\HMCLauncher.exe | |
| RUST_TOOLCHAIN: nightly-2026-04-16 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: HMCL-Dev/HMCL | |
| ref: main | |
| path: HMCL-Build | |
| - name: Get short SHA | |
| shell: pwsh | |
| run: echo "SHORT_SHA=$("${{ github.sha }}".Substring(0, 7))" >> $env:GITHUB_ENV | |
| - name: Setup Rust | |
| shell: pwsh | |
| run: rustup toolchain install $env:RUST_TOOLCHAIN --profile minimal --component rust-src | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: "17" | |
| java-package: jdk+fx | |
| cache: gradle | |
| - name: Build HMCLauncher | |
| shell: pwsh | |
| run: cargo build --release --locked | |
| - name: Create checksum file | |
| shell: pwsh | |
| run: Out-File -InputObject (Get-FileHash -Path $env:LAUNCHER_PATH -Algorithm SHA256).Hash.ToLower() -FilePath "$env:LAUNCHER_PATH.sha256" -NoNewline | |
| - name: Build HMCL | |
| shell: pwsh | |
| run: | | |
| $env:HMCL_LAUNCHER_EXE = Join-Path $env:GITHUB_WORKSPACE $env:LAUNCHER_PATH | |
| Set-Location "$env:GITHUB_WORKSPACE\HMCL-Build" | |
| .\gradlew makeExecutables --no-daemon | |
| - name: Copy Artifacts | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path Artifacts -Force | Out-Null | |
| Copy-Item -Path HMCL-Build\HMCL\build\libs\*.exe -Destination Artifacts | |
| Copy-Item -Path HMCL-Build\HMCL\build\libs\*.exe.sha256 -Destination Artifacts | |
| Copy-Item -Path $env:LAUNCHER_PATH -Destination Artifacts | |
| Copy-Item -Path "$env:LAUNCHER_PATH.sha256" -Destination Artifacts | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HMCLauncher-${{ env.SHORT_SHA }} | |
| path: Artifacts | |
| - name: Create release | |
| if: ${{ github.ref_type == 'tag' }} | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| target/i686-win7-windows-msvc/release/HMCLauncher.exe | |
| target/i686-win7-windows-msvc/release/HMCLauncher.exe.sha256 |