diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f823a76..610ac25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,13 +76,34 @@ jobs: shell: powershell run: | if ($PSVersionTable.PSVersion.Major -ne 5) { throw "Expected Windows PowerShell 5.1" } - $latestTag = git tag --list "v*" --sort=-version:refname | Select-Object -First 1 - if (-not $latestTag) { throw "No published version tag found" } - $env:LEXMOUNT_BROWSER_CLI_VERSION = $latestTag.TrimStart('v') + # The current release tag may exist before its COS assets are uploaded. + # Bootstrap against the previous published tag to avoid that race. + $publishedTag = git tag --list "v*" --sort=-version:refname | Select-Object -Skip 1 -First 1 + if (-not $publishedTag) { throw "No previous published version tag found" } + $env:LEXMOUNT_BROWSER_CLI_VERSION = $publishedTag.TrimStart('v') $env:LEXMOUNT_BROWSER_CLI_INSTALL_DIR = Join-Path $env:RUNNER_TEMP "browser-cli-bootstrap" & .\skills\lexmount-browser\scripts\bootstrap.ps1 & (Join-Path $env:LEXMOUNT_BROWSER_CLI_INSTALL_DIR "browser-cli.exe") version + linux-release: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v5 + - uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-unknown-linux-musl + - run: sudo apt-get update && sudo apt-get install --yes musl-tools + - name: Build static Linux binary + run: cargo build --release --locked --target x86_64-unknown-linux-musl + - name: Verify standalone Linux executable + run: | + binary="target/x86_64-unknown-linux-musl/release/browser-cli" + if readelf --program-headers --wide "$binary" | grep -F 'Requesting program interpreter'; then + echo 'Linux release binary is dynamically linked' >&2 + exit 1 + fi + "$binary" version + windows-release: runs-on: windows-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d6fff6..8e4444c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,9 +47,6 @@ jobs: - run: sudo apt-get update && sudo apt-get install --yes musl-tools - run: cargo test --locked - name: Build static Linux binary - env: - CC_x86_64_unknown_linux_musl: musl-gcc - CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: musl-gcc run: cargo build --release --locked --target x86_64-unknown-linux-musl - name: Package run: | diff --git a/Cargo.lock b/Cargo.lock index 8958de6..7f23ff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1208,7 +1208,7 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "lexmount-browser" -version = "1.1.14" +version = "1.1.15" dependencies = [ "base64 0.22.1", "clap", diff --git a/Cargo.toml b/Cargo.toml index 7e7592d..d485aa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lexmount-browser" -version = "1.1.14" +version = "1.1.15" edition = "2024" license = "MIT" description = "Native Rust SDK and CLI for Lexmount cloud browsers" diff --git a/skills/lexmount-browser/scripts/bootstrap.ps1 b/skills/lexmount-browser/scripts/bootstrap.ps1 index 523eed1..d676619 100644 --- a/skills/lexmount-browser/scripts/bootstrap.ps1 +++ b/skills/lexmount-browser/scripts/bootstrap.ps1 @@ -12,7 +12,7 @@ function Invoke-Tls12Download { } } -$version = if ($env:LEXMOUNT_BROWSER_CLI_VERSION) { $env:LEXMOUNT_BROWSER_CLI_VERSION } else { "1.1.14" } +$version = if ($env:LEXMOUNT_BROWSER_CLI_VERSION) { $env:LEXMOUNT_BROWSER_CLI_VERSION } else { "1.1.15" } $downloadBaseUrl = if ($env:LEXMOUNT_BROWSER_CLI_DOWNLOAD_BASE_URL) { $env:LEXMOUNT_BROWSER_CLI_DOWNLOAD_BASE_URL.TrimEnd('/') } else { "https://cli-bin-1377899528.cos.ap-nanjing.myqcloud.com/releases/browser-cli" } $architecture = if ($env:PROCESSOR_ARCHITEW6432) { $env:PROCESSOR_ARCHITEW6432 } else { $env:PROCESSOR_ARCHITECTURE } if ($architecture -ne "AMD64") { throw "Only Windows x64 is supported" } diff --git a/skills/lexmount-browser/scripts/bootstrap.sh b/skills/lexmount-browser/scripts/bootstrap.sh index 04f484a..fce1662 100755 --- a/skills/lexmount-browser/scripts/bootstrap.sh +++ b/skills/lexmount-browser/scripts/bootstrap.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -version="${LEXMOUNT_BROWSER_CLI_VERSION:-1.1.14}" +version="${LEXMOUNT_BROWSER_CLI_VERSION:-1.1.15}" download_base_url="${LEXMOUNT_BROWSER_CLI_DOWNLOAD_BASE_URL:-https://cli-bin-1377899528.cos.ap-nanjing.myqcloud.com/releases/browser-cli}" repo="${download_base_url%/}/v${version}" case "$(uname -s)-$(uname -m)" in