Repository navigation
feat: 圧縮/解凍後の出力ファイル検証を追加 (PNGシグネチャチェック) #41
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] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Build Plugin (net48) | |
| run: dotnet build src/Plugin/KK_CardCompression.csproj -c Release | |
| - name: Build Desktop App | |
| run: dotnet build src/App/KK_CardCompression.csproj -c Release | |
| - name: Publish Desktop App (single-file) | |
| run: | | |
| dotnet publish src/App/KK_CardCompression.csproj -c Release ` | |
| --self-contained false ` | |
| -p:PublishSingleFile=true ` | |
| -p:IncludeNativeLibrariesForSelfExtract=true ` | |
| -o publish-desktop/ | |
| - name: Verify outputs | |
| shell: pwsh | |
| run: | | |
| $exe = "publish-desktop/KK_CardCompression.exe" | |
| $dll = "src/Plugin/bin/Release/KK_CardCompression.dll" | |
| if (-not (Test-Path $exe)) { | |
| Write-Host "::error::Desktop EXE not found: $exe" | |
| exit 1 | |
| } | |
| if (-not (Test-Path $dll)) { | |
| Write-Host "::error::Plugin DLL not found: $dll" | |
| exit 1 | |
| } | |
| $exeSize = [math]::Round((Get-Item $exe).Length / 1MB, 2) | |
| $dllSize = [math]::Round((Get-Item $dll).Length / 1KB, 0) | |
| echo "## Build Results" >> $env:GITHUB_STEP_SUMMARY | |
| echo "" >> $env:GITHUB_STEP_SUMMARY | |
| echo "| Artifact | Size |" >> $env:GITHUB_STEP_SUMMARY | |
| echo "|----------|------|" >> $env:GITHUB_STEP_SUMMARY | |
| echo "| KK_CardCompression.exe | ${exeSize} MB |" >> $env:GITHUB_STEP_SUMMARY | |
| echo "| KK_CardCompression.dll | ${dllSize} KB |" >> $env:GITHUB_STEP_SUMMARY | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: KKCC-all | |
| path: | | |
| publish-desktop/KK_CardCompression.exe | |
| src/Plugin/bin/Release/KK_CardCompression.dll | |
| retention-days: 7 |