Skip to content

docs: fix README inaccuracies and add LICENSE file #1

docs: fix README inaccuracies and add LICENSE file

docs: fix README inaccuracies and add LICENSE file #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
runner: ubuntu-latest
use_cross: false
- target: aarch64-unknown-linux-gnu
runner: ubuntu-latest
use_cross: true
- target: x86_64-apple-darwin
runner: macos-13
use_cross: false
- target: aarch64-apple-darwin
runner: macos-latest
use_cross: false
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo-
- name: Install cross
if: matrix.use_cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build (native)
if: "!matrix.use_cross"
run: cargo build --release --target ${{ matrix.target }}
- name: Build (cross)
if: matrix.use_cross
run: cross build --release --target ${{ matrix.target }}
- name: Rename binary
run: cp target/${{ matrix.target }}/release/hookbin hookbin-${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: hookbin-${{ matrix.target }}
path: hookbin-${{ matrix.target }}
release:
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Collect binaries and generate checksums
run: |
mkdir release
cp artifacts/hookbin-*/hookbin-* release/
cd release
sha256sum hookbin-* > SHA256SUMS
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: release/*