From d2ebb8dee30318b7c8ded49021188edce7feb3fd Mon Sep 17 00:00:00 2001 From: Ruslan Strazhnyk Date: Sun, 22 Nov 2026 10:56:35 +0100 Subject: [PATCH] Fix Panthera release build checks --- .github/workflows/release.yml | 10 +++++----- README.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e836c1..af45b92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,8 +46,8 @@ jobs: run: | version=$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -1) test "v$version" = "$TAG" || { echo "tag $TAG does not match Cargo.toml version $version"; exit 1; } - git fetch --no-tags origin main - git merge-base --is-ancestor "$GITHUB_SHA" origin/main || { echo "tagged commit is not on main"; exit 1; } + # The full checkout already fetched main without persisting credentials. + git merge-base --is-ancestor "$GITHUB_SHA" refs/remotes/origin/main || { echo "tagged commit is not on main"; exit 1; } grep -q "^## \[$version\]" CHANGELOG.md || { echo "CHANGELOG.md has no [$version] section"; exit 1; } echo "version=$version" >> "$GITHUB_OUTPUT" @@ -69,7 +69,7 @@ jobs: sh -ec 'apk add --no-cache musl-dev >/dev/null && cargo build --release --locked && ./target/release/panthera --version' mkdir -p dist cp target/release/panthera dist/panthera-linux-x86_64 - file dist/panthera-linux-x86_64 | grep -q 'statically linked' + LC_ALL=C file -b dist/panthera-linux-x86_64 | grep -Eq 'statically linked|static-pie linked' - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: panthera-linux-x86_64 @@ -79,7 +79,7 @@ jobs: build-macos: needs: checks - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 20 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -145,7 +145,7 @@ jobs: "rust_toolchain": os.environ["RUST_TOOLCHAIN"], "linux_builder": os.environ["LINUX_BUILDER"], "linux_builder_prerequisite": "musl-dev (Alpine mirror, not snapshotted)", - "macos_runner": "macos-14", + "macos_runner": "macos-15", }, "attestation": "unavailable: private repository on the GitHub Team plan", } diff --git a/README.md b/README.md index 5ca8757..734bc6a 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ Releases are produced only by `.github/workflows/release.yml`, triggered by a `v*` tag on `main` whose version matches `Cargo.toml` and has a `CHANGELOG.md` section. It runs the CI checks, builds a static x86-64 musl binary in `rust:1.94.1-alpine3.22` (pinned by digest, `--platform linux/amd64`) and a -macOS arm64 binary on `macos-14`, then uploads them with `SHA256SUMS` and a +macOS arm64 binary on `macos-15`, then uploads them with `SHA256SUMS` and a schema 2 `build.json` naming the workflow run, toolchain and builder. Existing releases are never overwritten. `panthera --version` identifies the build.