From 44e7482f9a65e7e1a5802f82edc86ee4acce7522 Mon Sep 17 00:00:00 2001 From: Husni Adil Makmur Date: Sun, 2 Aug 2026 12:18:25 +0700 Subject: [PATCH] feat: ship Windows binaries and fix broken install instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI has built and verified windows/amd64 with CGO_ENABLED=1 on every PR for a while, but the release workflow never shipped the result, so Windows users had no binary to download. The provider code, signal handling (runner_windows.go) and Credential Manager keyring backend were already there and documented — only the release matrix was missing. Windows ships a .zip rather than a .tar.gz because that is what Windows users expect, and the publish job already collected *.zip. The archive step is split per-OS so the existing four targets keep their exact current code path. Separately, every download command in the README returned 404. The cause is the filenames: the README used goreleaser-style names (sstart_Linux_x86_64.tar.gz) while the workflow produces sstart---.tar.gz. Release assets embed the version, so a stable latest/download/ URL cannot resolve for any filename; the instructions now read the latest tag first, then build the URL. The links also move to securestart/sstart. dirathea/sstart still works — it is a redirect left over from the org transfer, not a separate repo — but pointing at the canonical path avoids depending on that redirect being kept alive. The go install line keeps the dirathea module path, which is what go.mod declares. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Hmh2p2Bg6kmxxvzpFDW2WL --- .github/workflows/release.yml | 32 +++++++++++++++++++++++++++++++- README.md | 31 ++++++++++++++++++------------- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 811377a..4270a66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,11 @@ jobs: goos: darwin goarch: arm64 binary_name: sstart + - build_id: sstart-windows-amd64 + runner: windows-latest + goos: windows + goarch: amd64 + binary_name: sstart.exe runs-on: ${{ matrix.runner }} steps: - name: Checkout code @@ -86,6 +91,7 @@ jobs: ./cmd/sstart - name: Prepare release archive + if: matrix.goos != 'windows' run: | mkdir -p release @@ -115,6 +121,30 @@ jobs: echo "Archive contents:" tar -tzf "release/${ARCHIVE_NAME}.tar.gz" | head -10 + # Windows ships a .zip instead of a .tar.gz: it is what Windows users + # expect, and Compress-Archive is guaranteed present on the runner + # image, unlike zip(1). The publish job already collects *.zip. + - name: Prepare release archive (Windows) + if: matrix.goos == 'windows' + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + New-Item -ItemType Directory -Force -Path release | Out-Null + + $archiveName = "sstart-${{ steps.version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}" + $stageDir = (New-Item -ItemType Directory -Force -Path (Join-Path $env:RUNNER_TEMP $archiveName)).FullName + + Copy-Item "${{ matrix.binary_name }}" -Destination $stageDir + Copy-Item LICENSE, README.md -Destination $stageDir -ErrorAction SilentlyContinue + + Write-Host "Archive contents:" + Get-ChildItem $stageDir | ForEach-Object { Write-Host " $($_.Name)" } + + # Archive the staged contents, not the folder itself, so the binary + # sits at the archive root like it does in the tar.gz builds + Compress-Archive -Path (Join-Path $stageDir '*') -DestinationPath "release/$archiveName.zip" -Force + Remove-Item $stageDir -Recurse -Force + - name: Upload build artifacts uses: actions/upload-artifact@v7 with: @@ -179,7 +209,7 @@ jobs: Release ${{ steps.version.outputs.version }} ## Assets - - Pre-built binaries for Linux (amd64, arm64) and macOS (amd64, arm64) + - Pre-built binaries for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64) - Checksums file for verification files: release/* draft: false diff --git a/README.md b/README.md index f2915d9..bd0faa9 100644 --- a/README.md +++ b/README.md @@ -29,28 +29,33 @@ You define all your required secrets from all your sources in a single, declarat ### Install from GitHub Releases (Recommended) -Download the pre-built binary for your platform from the [latest release](https://github.com/dirathea/sstart/releases/latest): +Download the pre-built binary for your platform from the [latest release](https://github.com/securestart/sstart/releases/latest). -**Linux (amd64):** -```bash -curl -L https://github.com/dirathea/sstart/releases/latest/download/sstart_Linux_x86_64.tar.gz | tar -xz -sudo mv sstart /usr/local/bin/ -``` +Release assets are named `sstart---.tar.gz` (`.zip` on Windows), so the +version is part of the filename. Resolve the latest tag first, then download: -**macOS (amd64):** +**Linux and macOS:** ```bash -curl -L https://github.com/dirathea/sstart/releases/latest/download/sstart_Darwin_x86_64.tar.gz | tar -xz +VERSION=$(curl -s https://api.github.com/repos/securestart/sstart/releases/latest | sed -n 's/.*"tag_name": *"v\{0,1\}\([^"]*\)".*/\1/p' | head -1) +OS=$(uname -s | tr '[:upper:]' '[:lower:]') # linux | darwin +ARCH=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/') # amd64 | arm64 + +curl -L "https://github.com/securestart/sstart/releases/download/v${VERSION}/sstart-${VERSION}-${OS}-${ARCH}.tar.gz" | tar -xz sudo mv sstart /usr/local/bin/ ``` -**macOS (Apple Silicon/arm64):** -```bash -curl -L https://github.com/dirathea/sstart/releases/latest/download/sstart_Darwin_arm64.tar.gz | tar -xz -sudo mv sstart /usr/local/bin/ +Supported combinations: `linux-amd64`, `linux-arm64`, `darwin-amd64`, `darwin-arm64`. + +**Windows (amd64), PowerShell:** +```powershell +$version = (Invoke-RestMethod https://api.github.com/repos/securestart/sstart/releases/latest).tag_name.TrimStart('v') +Invoke-WebRequest "https://github.com/securestart/sstart/releases/download/v$version/sstart-$version-windows-amd64.zip" -OutFile sstart.zip +Expand-Archive sstart.zip -DestinationPath . +# then move sstart.exe somewhere on your PATH ``` **Using a specific version:** -Replace `latest` with a version tag (e.g., `v1.0.0`) in the URLs above. +Set `VERSION` (or `$version`) to the release you want, e.g. `0.0.11`, instead of querying the API. ### Install via Go