diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-08-18 22:39:38 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-08-18 22:39:38 +0300 |
| commit | 9fac51722653fa0b0b6a5786166fb18c763424e0 (patch) | |
| tree | a8efd3b30cf29a8fb11138b7444bb9baa0dac2fa /.github/workflows | |
| parent | 0bd445020ea19e0cea13f42a28212db7b2df196d (diff) | |
feat: make Windows generally available
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/release.yml | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75a2ffed..891f5fe6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,6 +61,11 @@ jobs: name: herdr-macos-aarch64 libghostty_vt_optimize: ReleaseFast libghostty_vt_simd: 'true' + - target: x86_64-pc-windows-msvc + os: windows-2022 + name: herdr-windows-x86_64.zip + libghostty_vt_optimize: ReleaseFast + libghostty_vt_simd: 'true' runs-on: ${{ matrix.os }} env: @@ -73,6 +78,7 @@ jobs: persist-credentials: false - name: Verify tag matches Cargo.toml version + shell: bash run: | CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/') TAG_VERSION="${GITHUB_REF_NAME#v}" @@ -139,14 +145,35 @@ jobs: key: release-${{ matrix.target }} - name: Remove Zig caches + shell: bash run: rm -rf .zig-cache vendor/libghostty-vt/.zig-cache vendor/libghostty-vt/zig-out - name: Build run: cargo build --release --locked --target ${{ matrix.target }} - - name: Rename binary + - name: Package artifact + if: runner.os != 'Windows' + shell: bash run: cp target/${{ matrix.target }}/release/herdr ${{ matrix.name }} + - name: Package artifact + if: runner.os == 'Windows' + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $package = Join-Path $env:RUNNER_TEMP "Microsoft.Windows.Console.ConPTY.nupkg" + $stage = Join-Path $env:RUNNER_TEMP "herdr-windows-x86_64" + .\scripts\package_windows_conpty.ps1 ` + -HerdrExe target\${{ matrix.target }}\release\herdr.exe ` + -PackagePath $package ` + -StageDir $stage ` + -OutputPath ${{ matrix.name }} + $version = (& (Join-Path $stage "herdr.exe") --version | Out-String).Trim() + $tagVersion = $env:GITHUB_REF_NAME -replace '^v', '' + if ($version -notmatch [regex]::Escape($tagVersion) -or $version -match "preview") { + throw "Packaged Windows binary has unexpected version identity: $version" + } + - name: Upload artifact uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: @@ -200,6 +227,7 @@ jobs: herdr-linux-aarch64/herdr-linux-aarch64 herdr-macos-x86_64/herdr-macos-x86_64 herdr-macos-aarch64/herdr-macos-aarch64 + herdr-windows-x86_64.zip/herdr-windows-x86_64.zip body_path: RELEASE_NOTES.md close-released-issues: |
