feature: randomize compressor feedback + library-seed constants (#69) #173
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 | |
| # Build validation. GitHub Actions minutes are limited, so this runs automatically | |
| # only for PRs into `main` (the develop -> main gate). For PRs into `develop`, | |
| # day-to-day validation is done with scripts/local-ci.sh; a run here happens only | |
| # when an admin adds the `run-ci` label (re-add it to trigger each run) or | |
| # dispatches the workflow manually. See the `if:` on the build job below. | |
| # | |
| # This workflow does NOT publish releases — that is handled by release.yml | |
| # (manual dispatch + a monthly check for new commits on main). | |
| on: | |
| pull_request: | |
| branches: [main, develop] | |
| types: [opened, synchronize, reopened, labeled] | |
| paths-ignore: ['**.md', 'docs/**', 'LICENSE*'] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| # Auto for PRs into main and manual dispatch; for develop PRs only when an | |
| # admin adds the `run-ci` label. | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.base_ref == 'main' || | |
| (github.event.action == 'labeled' && github.event.label.name == 'run-ci') | |
| runs-on: windows-2025 | |
| timeout-minutes: 10 | |
| env: | |
| NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ github.workspace }}/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.vcxproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Install nbgv | |
| run: dotnet tool install -g nbgv | |
| - name: Compute version | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $ver = nbgv get-version -v NuGetPackageVersion | |
| echo "VERSION=$ver" >> $env:GITHUB_OUTPUT | |
| Write-Host "Version: $ver" | |
| - name: Restore | |
| run: msbuild Confuser2.sln -t:Restore -verbosity:minimal | |
| - name: Build | |
| run: msbuild Confuser2.sln -p:Configuration=Release -verbosity:minimal | |
| - name: Package CLI | |
| shell: pwsh | |
| run: | | |
| $src = 'Confuser.CLI/bin/Release/net10.0' | |
| $zip = 'ConfuserEx-CLI.zip' | |
| Get-ChildItem $src -Exclude '*.pdb','*.xml' | Compress-Archive -DestinationPath $zip | |
| Write-Host "Created $zip ($([math]::Round((Get-Item $zip).Length / 1MB, 1)) MB)" | |
| - name: Package GUI | |
| shell: pwsh | |
| run: | | |
| $src = 'ConfuserEx/bin/Release/net10.0-windows' | |
| $zip = 'ConfuserEx-GUI.zip' | |
| Get-ChildItem $src -Exclude '*.pdb','*.xml' | Compress-Archive -DestinationPath $zip | |
| Write-Host "Created $zip ($([math]::Round((Get-Item $zip).Length / 1MB, 1)) MB)" | |
| - name: Package combined | |
| shell: pwsh | |
| run: | | |
| $zip = 'ConfuserEx.zip' | |
| $tmp = 'combined' | |
| New-Item -ItemType Directory -Path $tmp -Force | Out-Null | |
| Copy-Item 'Confuser.CLI/bin/Release/net10.0/*' $tmp -Exclude '*.pdb','*.xml' -Recurse | |
| Copy-Item 'ConfuserEx/bin/Release/net10.0-windows/*' $tmp -Exclude '*.pdb','*.xml' -Recurse -Force | |
| Get-ChildItem $tmp | Compress-Archive -DestinationPath $zip | |
| Remove-Item $tmp -Recurse -Force | |
| Write-Host "Created $zip ($([math]::Round((Get-Item $zip).Length / 1MB, 1)) MB)" | |
| - name: Upload packages | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: confuserex-packages | |
| path: | | |
| ConfuserEx-CLI.zip | |
| ConfuserEx-GUI.zip | |
| ConfuserEx.zip | |
| Confuser.MSBuild.Tasks/bin/Release/*.nupkg |