Skip to content

fix: add missing nix dependency for process liveness check #18

fix: add missing nix dependency for process liveness check

fix: add missing nix dependency for process liveness check #18

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# macOS — both targets built on arm64 runner (cross-compile for Intel)
- target: aarch64-apple-darwin
os: macos-latest
use_cross: false
- target: x86_64-apple-darwin
os: macos-latest
use_cross: false
# Linux — musl static binaries
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
use_cross: false
- target: i686-unknown-linux-musl
os: ubuntu-latest
use_cross: true
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
use_cross: true
- target: armv7-unknown-linux-musleabihf
os: ubuntu-latest
use_cross: true
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install musl-tools (Linux x86_64 native)
if: matrix.os == 'ubuntu-latest' && !matrix.use_cross
run: sudo apt-get install -y musl-tools
- name: Install cross
if: matrix.use_cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build
run: |
if [ "${{ matrix.use_cross }}" = "true" ]; then
cross build --release --target ${{ matrix.target }}
else
cargo build --release --target ${{ matrix.target }}
fi
- name: Package archive
shell: bash
run: |
VERSION="${GITHUB_REF_NAME}"
TARGET="${{ matrix.target }}"
ARCHIVE="haven-${VERSION}-${TARGET}.tar.gz"
cp "target/${TARGET}/release/haven" haven
tar czf "${ARCHIVE}" haven
rm haven
echo "ARCHIVE=${ARCHIVE}" >> "${GITHUB_ENV}"
- name: Upload archive artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ${{ env.ARCHIVE }}
if-no-files-found: error
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Generate SHA256SUMS
run: |
VERSION="${GITHUB_REF_NAME}"
cd artifacts
sha256sum haven-"${VERSION}"-*.tar.gz > "haven-${VERSION}-SHA256SUMS"
cat "haven-${VERSION}-SHA256SUMS"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/haven-*.tar.gz
artifacts/haven-*-SHA256SUMS
generate_release_notes: true
fail_on_unmatched_files: true