Skip to content

fix(node): keep agent online when updates fail #33

fix(node): keep agent online when updates fail

fix(node): keep agent online when updates fail #33

Workflow file for this run

name: release-node
# Build the wolf-node probe for every supported platform and attach the
# binaries to the GitHub Release. Built in a SINGLE job (Go cross-compiles
# trivially) and uploaded once, so the matrix jobs can't race each other on the
# release create/update. Asset names must match the install.sh / install.ps1
# downloaders: wolf-node_<os>_<arch>[.exe]
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: "1.26.6"
cache-dependency-path: node/go.sum
- name: Build all targets
working-directory: node
env:
CGO_ENABLED: "0"
# release-node only runs on `push tags: v*`, so GITHUB_REF_NAME is
# the tag ("v1.6.8"). Strip the "v" to match Version's shape (the
# updater tolerates both, but keeping the literal untagged avoids
# noise in `-version` output).
VERSION: ${{ github.ref_name }}
run: |
mkdir -p dist
# -X main.Version=… injects the tag into node/config.go's Version
# at link time. Skipping this in v1.6.7 shipped a binary that self-
# reported the source-hardcoded "1.6.6", causing every node that
# updated to v1.6.7 to think it *still* needed updating and reinstall
# on a ~1s loop. Never remove this without also removing the
# `desiredAgentVersion` self-update path.
LDFLAGS="-s -w -X main.Version=${VERSION#v}"
build() {
local os="$1" arch="$2" ext="$3"
echo "→ wolf-node_${os}_${arch}${ext}"
GOOS="$os" GOARCH="$arch" go build -trimpath -ldflags "$LDFLAGS" \
-o "dist/wolf-node_${os}_${arch}${ext}" .
}
build linux amd64 ""
build linux arm64 ""
build darwin amd64 ""
build darwin arm64 ""
build windows amd64 .exe
build windows arm64 .exe
ls -la dist
- name: Generate SHA256SUMS
working-directory: node/dist
run: |
# Stable, line-ordered hashes the installer verifies the binary against
# before running it, so a MITM proxy can't swap in a backdoored build.
sha256sum wolf-node_* | sort -k 2 > SHA256SUMS
cat SHA256SUMS
- name: Upload to release
uses: softprops/action-gh-release@v3
with:
files: |
node/dist/wolf-node_*
node/dist/SHA256SUMS
fail_on_unmatched_files: true