diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d78e26..d61eecc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,23 +112,37 @@ jobs: run: >- node scripts/prepare-portable.mjs --binary "src-tauri/target/release/cpa-gui${{ matrix.os == 'windows' && '.exe' || '' }}" - --output "release/cpa-gui-${{ matrix.os }}-${{ matrix.arch }}" + --output "release/Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}" --os "${{ matrix.os }}" --arch "${{ matrix.arch }}" --download true - --clean-core true shell: bash + - name: Verify archive-only core payload + shell: bash + env: + CORE_DIR: release/Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}/cpa-core + run: | + node - <<'NODE' + const { readdirSync } = require('node:fs'); + const entries = readdirSync(process.env.CORE_DIR, { withFileTypes: true }); + const valid = entries.length === 1 + && entries[0].isFile() + && /\.(zip|tar\.gz)$/.test(entries[0].name); + if (!valid) { + throw new Error(`cpa-core must contain exactly one archive; found: ${entries.map((entry) => entry.name).join(', ')}`); + } + NODE - name: Archive Unix release if: matrix.os != 'windows' - run: tar -czf "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" -C release "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}" + run: tar -czf "Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}.tar.gz" -C release "Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}" - name: Archive Windows release if: matrix.os == 'windows' shell: pwsh - run: Compress-Archive -Path "release/cpa-gui-${{ matrix.os }}-${{ matrix.arch }}" -DestinationPath "cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.zip" + run: Compress-Archive -Path "release/Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}" -DestinationPath "Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}.zip" - uses: actions/upload-artifact@v7 with: - name: cpa-gui-${{ matrix.os }}-${{ matrix.arch }} - path: cpa-gui-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.suffix }} + name: Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }} + path: Easy_CLIProxyAPI-${{ matrix.os }}-${{ matrix.arch }}.${{ matrix.suffix }} if-no-files-found: error retention-days: 14 @@ -159,7 +173,7 @@ jobs: fi prerelease="$MANUAL_PRERELEASE" - release_args=(--title "CPA GUI $RELEASE_TAG" --generate-notes) + release_args=(--title "Easy_CLIProxyAPI $RELEASE_TAG" --generate-notes) if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then release_args+=(--verify-tag) if [[ "$RELEASE_TAG" == *-* ]]; then diff --git a/build.ps1 b/build.ps1 index a8c777c..7f7226d 100644 --- a/build.ps1 +++ b/build.ps1 @@ -9,7 +9,7 @@ $ErrorActionPreference = 'Stop' $RootDir = $PSScriptRoot $AppBin = Join-Path $RootDir 'src-tauri\target\release\cpa-gui.exe' $BinDir = Join-Path $RootDir 'bin-work' -$BinOut = Join-Path $BinDir 'cpa-gui.exe' +$BinOut = Join-Path $BinDir 'Easy_CLIProxyAPI.exe' $PreparePortable = Join-Path $RootDir 'scripts\prepare-portable.mjs' Set-Location -LiteralPath $RootDir @@ -67,5 +67,16 @@ if (-not (Test-Path -LiteralPath $BinOut -PathType Leaf)) { throw "Portable preparation finished, but executable not found: $BinOut" } +$CoreOut = Join-Path $BinDir 'cpa-core' +$CoreEntries = @(Get-ChildItem -LiteralPath $CoreOut -Force) +if ( + $CoreEntries.Count -ne 1 -or + $CoreEntries[0].PSIsContainer -or + $CoreEntries[0].Name -notmatch '^CLIProxyAPI_.+_windows_.+\.zip$' +) { + throw "Portable core output must contain exactly one Windows core archive: $CoreOut" +} + Write-Host "Built: $AppBin" Write-Host "Copied: $BinOut" +Write-Host "Bundled core archive: $($CoreEntries[0].FullName)" diff --git a/build.sh b/build.sh index 5031145..3d8b668 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ cd "$ROOT_DIR" BUILD_JOBS="${CARGO_BUILD_JOBS:-20}" APP_BIN="$ROOT_DIR/src-tauri/target/release/cpa-gui" BIN_DIR="$ROOT_DIR/bin-work" -BIN_OUT="$BIN_DIR/cpa-gui" +BIN_OUT="$BIN_DIR/Easy_CLIProxyAPI" if ! command -v bun >/dev/null 2>&1; then echo "bun is not installed or not in PATH." diff --git a/index.html b/index.html index 38b3986..de6f754 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@
-