Repository navigation
ci: add GitHub Actions for CI build and release #5
Workflow file for this run
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: | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@3951f7a3d0e4d4e2f034b34c16e3b4f5e4da1e17 # v4.3.0 | |
| with: | |
| dotnet-version: '8.0.x' | |
| # --- デスクトップツール (EXE) --- | |
| - name: Publish desktop tool | |
| run: | | |
| dotnet publish KK_CardCompression.csproj -c Release ` | |
| --self-contained false ` | |
| -p:PublishSingleFile=true ` | |
| -p:IncludeNativeLibrariesForSelfExtract=true ` | |
| -o publish-desktop/ | |
| # --- BepInEx プラグイン (DLL) --- | |
| - name: Build plugin (ILRepack merges into single DLL) | |
| run: dotnet build KK_CardCompression.Plugin/KK_CardCompression.Plugin.csproj -c Release | |
| - name: Prepare plugin distribution | |
| run: | | |
| New-Item -Path "publish-plugin" -ItemType Directory -Force | |
| Copy-Item "KK_CardCompression.Plugin/bin/Release/net48/KK_CardCompression.dll" "publish-plugin/" | |
| # 辞書ファイルはDLLに埋め込み済みだが、フォールバック用として同梱 | |
| Copy-Item "Resources/kk_universal_dict.zstd" "publish-plugin/" | |
| # --- リリース作成 --- | |
| - name: Get version from tag | |
| id: version | |
| shell: bash | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: echo "version=${REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@72d3cb730e23975b1f70e8e59aef6b9c1a5d3e5b # v2.3.0 | |
| with: | |
| name: "KKCC ${{ github.ref_name }}" | |
| body: | | |
| ## KKCC ${{ github.ref_name }} | |
| Koikatsu カード・シーン PNG ファイルのロスレス圧縮/解凍ツール | |
| ### ダウンロード | |
| | ファイル | 説明 | | |
| |----------|------| | |
| | `KK_CardCompression.exe` | デスクトップツール(.NET 8 Runtime 必要) | | |
| | `KK_CardCompression.dll` | BepInEx プラグイン(ゲーム内解凍用) | | |
| ### デスクトップツールの使い方 | |
| 1. [.NET 8 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/8.0) をインストール | |
| 2. `KK_CardCompression.exe` を実行 | |
| ### BepInEx プラグインの使い方 | |
| 1. `BepInEx/plugins/KK_CardCompression/` フォルダを作成 | |
| 2. `KK_CardCompression.dll` と `kk_universal_dict.zstd` を配置 | |
| 3. ゲームを起動すると自動ロードされる | |
| files: | | |
| publish-desktop/KK_CardCompression.exe | |
| publish-plugin/KK_CardCompression.dll | |
| publish-plugin/kk_universal_dict.zstd | |
| draft: false | |
| prerelease: false |