Repository navigation
Add MIT license #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 & Release | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Publish self-contained exe | |
| run: dotnet publish -c Release -o publish --no-restore | |
| # The exe is useless if it cannot start standalone - the most likely | |
| # packaging failure is the bundled LimebrellaSharpCore.dll going missing. | |
| - name: Smoke test (runs outside the build tree) | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force cleanroom | Out-Null | |
| Copy-Item publish/RE4SaveIdFinder.exe cleanroom/ | |
| $out = & ./cleanroom/RE4SaveIdFinder.exe 2>&1 | Out-String | |
| $code = $LASTEXITCODE | |
| if ($code -ne 2) { throw "expected exit code 2 for no args, got $code" } | |
| if ($out -notmatch 'Usage: RE4SaveIdFinder') { throw "usage text missing:`n$out" } | |
| Write-Host "Smoke test passed." | |
| # The tool exits 2 by design here. pwsh steps end with $LASTEXITCODE, so | |
| # without this the step fails despite every assertion passing. | |
| exit 0 | |
| - name: Stage release files | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force dist | Out-Null | |
| Copy-Item publish/RE4SaveIdFinder.exe dist/ | |
| Copy-Item README.md, THIRD-PARTY-NOTICES.txt dist/ | |
| if (Test-Path LICENSE) { Copy-Item LICENSE dist/ } | |
| Compress-Archive -Path dist/* -DestinationPath RE4SaveIdFinder-win-x64.zip -Force | |
| Get-ChildItem dist | Select-Object Name, Length | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RE4SaveIdFinder-win-x64 | |
| path: dist/* | |
| - name: Publish GitHub release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: RE4SaveIdFinder-win-x64.zip | |
| generate_release_notes: true | |
| body: | | |
| Recovers the Steam32 ID a RE4R (DSSS/Lime) save file was signed with. | |
| **Usage:** `RE4SaveIdFinder.exe <input.bin>` — scans all 4.29 billion IDs in ~7 minutes. | |
| Self-contained: no .NET runtime required. Windows x64 with AES-NI. | |
| See `THIRD-PARTY-NOTICES.txt` for the bundled LimebrellaSharp (MIT) notice. |