diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7d1855a5..d7cd24e9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -86,4 +86,55 @@ jobs: echo "macOS double installation test passed - segfault fix verified" shell: bash + + - name: Test Bash Install Script (Windows) + if: matrix.os == 'windows-latest' + run: | + # Windows test - simplified to avoid bash usage + Write-Host "Testing bash install script on Windows..." + + # Make script executable using PowerShell + if (Test-Path "install.sh") { + Write-Host "Found install.sh script" + } else { + Write-Host "install.sh not found" + exit 1 + } + + # Test with default options (latest version) + Write-Host "Testing install script with default options..." + & sh -c "./install.sh -d '$env:TEMP/agentuity-test-download'" + + # Check if the script correctly detected Windows and aborted + if ($LASTEXITCODE -eq 1) { + $output = & sh -c "./install.sh -d '$env:TEMP/agentuity-test-download'" 2>&1 + if ($output -match "Windows is not supported") { + Write-Host "Windows detection test passed: Script correctly detected Windows environment and aborted" + exit 0 + } else { + Write-Host "Windows detection test failed: Script did not abort with the expected message" + exit 1 + } + } else { + Write-Host "Windows detection test failed: Script did not abort as expected" + exit 1 + } + shell: pwsh + - name: Test PowerShell Install Script (Windows) + if: matrix.os == 'windows-latest' + env: + GITHUB_TOKEN: ${{ github.token }} + CI: true + AGENTUITY_TEST_VERSION: "0.0.74" + run: | + Write-Host "Testing PowerShell install script on Windows..." + + # Since we're removing Windows native support and only supporting Windows via WSL, + # we don't need a PowerShell install script anymore. + # This test is now skipped intentionally. + + Write-Host "Windows native installation is not supported - users should use WSL instead" + Write-Host "PowerShell install script test skipped intentionally" + exit 0 + shell: pwsh \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88f163c6..bc667e7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ permissions: jobs: release: - runs-on: blacksmith-4vcpu-ubuntu-2204 + runs-on: windows-latest # required to use wix steps: - name: Checkout uses: actions/checkout@v4 @@ -34,3 +34,8 @@ jobs: MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }} MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }} MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }} + + - uses: actions/attest-build-provenance@v2 + with: + subject-checksums: ./dist/checksums.txt + subject-checksums-type: sha256 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4f62d6c8..84799803 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -20,7 +20,6 @@ builds: binary: agentuity goos: - linux - - windows - darwin archives: @@ -34,10 +33,7 @@ archives: {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives - format_overrides: - - goos: windows - formats: ['zip'] + checksum: name_template: "checksums.txt" @@ -120,4 +116,3 @@ brews: bin.install "agentuity" alternative_names: - "agentuity@{{ .Version }}" - diff --git a/install.sh b/install.sh index 0459319d..ddb1c06b 100755 --- a/install.sh +++ b/install.sh @@ -119,8 +119,8 @@ is_linux() { } abort_if_windows() { - if [ "$OS" = "Windows" ]; then - abort "Windows is not supported. Please use WSL or a native Windows installation." + if [ "$OS" = "Windows" ] || echo "$OS" | grep -q "MINGW\|MSYS"; then + abort "Windows is not supported by this shell script. Please use the Windows installer or WSL." fi }