Skip to content

Add FreeBSD installation instructions #32

Add FreeBSD installation instructions

Add FreeBSD installation instructions #32

Workflow file for this run

---
name: Release Binaries
"on":
push:
tags:
- 'v*.*.*'
jobs:
release:
name: Release - ${{ matrix.platform.os-name }}
strategy:
matrix:
platform:
- os-name: Linux-x86_64
runs-on: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: rustygate-linux-amd64
cross_build: true
- os-name: Linux-aarch64
runs-on: ubuntu-latest
target: aarch64-unknown-linux-musl
artifact_name: rustygate-linux-arm64
cross_build: true
- os-name: macOS-x86_64
runs-on: macos-latest
target: x86_64-apple-darwin
artifact_name: rustygate-darwin-amd64
cross_build: false
- os-name: macOS-aarch64
runs-on: macos-latest
target: aarch64-apple-darwin
artifact_name: rustygate-darwin-arm64
cross_build: false
runs-on: ${{ matrix.platform.runs-on }}
steps:
- uses: actions/checkout@v4
# Linux-specific steps
- name: Install build dependencies
if: matrix.platform.cross_build
run: |
sudo apt-get update
sudo apt-get install -y musl-tools perl make
- name: Build with Cross
if: matrix.platform.cross_build
uses: houseabsolute/[email protected]
with:
target: ${{ matrix.platform.target }}
args: "--release"
strip: true
env: |
OPENSSL_STATIC=1
RUSTFLAGS="-C target-feature=+crt-static"
# macOS-specific steps
- name: Install Rust
if: "!matrix.platform.cross_build"
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: Build
if: "!matrix.platform.cross_build"
run: cargo build --release --target ${{ matrix.platform.target }}
# Common steps
- name: Prepare artifact
run: |
cp target/${{ matrix.platform.target }}/release/main ${{ matrix.platform.artifact_name }}
- name: Generate SHA256
run: |
if [ "${{ matrix.platform.cross_build }}" = "true" ]; then
sha256sum ${{ matrix.platform.artifact_name }}
else
shasum -a 256 ${{ matrix.platform.artifact_name }}
fi > ${{ matrix.platform.artifact_name }}.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.artifact_name }}
path: |
${{ matrix.platform.artifact_name }}
${{ matrix.platform.artifact_name }}.sha256
create-release:
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
**/rustygate-*
generate_release_notes: true