Skip to content

feat: add /topology command with Canvas-based agent graph overlay (#37) #1

feat: add /topology command with Canvas-based agent graph overlay (#37)

feat: add /topology command with Canvas-based agent graph overlay (#37) #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
BINARY_NAME: loopal
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
os: macos-13
archive: tar.gz
- target: aarch64-apple-darwin
os: macos-14
archive: tar.gz
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
archive: tar.gz
cross: true
- target: x86_64-pc-windows-msvc
os: windows-latest
archive: zip
steps:
- uses: actions/checkout@v4
- name: Install system dependencies (Linux)
if: runner.os == 'Linux' && !matrix.cross
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88.0"
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: release-${{ matrix.target }}
- name: Install cross
if: matrix.cross
run: cargo install cross --locked
- name: Build (cross)
if: matrix.cross
run: cross build --release --target ${{ matrix.target }}
- name: Build (native)
if: "!matrix.cross"
run: cargo build --release --target ${{ matrix.target }}
- name: Package (Unix)
if: runner.os != 'Windows'
run: |
ARCHIVE_DIR="${BINARY_NAME}-${{ github.ref_name }}-${{ matrix.target }}"
mkdir -p "${ARCHIVE_DIR}"
cp "target/${{ matrix.target }}/release/${BINARY_NAME}" "${ARCHIVE_DIR}/"
cp README.md "${ARCHIVE_DIR}/" 2>/dev/null || true
cp LICENSE "${ARCHIVE_DIR}/" 2>/dev/null || true
tar czf "${ARCHIVE_DIR}.tar.gz" "${ARCHIVE_DIR}"
echo "ASSET=${ARCHIVE_DIR}.tar.gz" >> "$GITHUB_ENV"
- name: Package (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$archiveDir = "$env:BINARY_NAME-${{ github.ref_name }}-${{ matrix.target }}"
New-Item -ItemType Directory -Path $archiveDir -Force
Copy-Item "target/${{ matrix.target }}/release/$env:BINARY_NAME.exe" "$archiveDir/"
if (Test-Path "README.md") { Copy-Item "README.md" "$archiveDir/" }
if (Test-Path "LICENSE") { Copy-Item "LICENSE" "$archiveDir/" }
Compress-Archive -Path "$archiveDir" -DestinationPath "$archiveDir.zip"
echo "ASSET=$archiveDir.zip" | Out-File -Append $env:GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_NAME }}-${{ matrix.target }}
path: ${{ env.ASSET }}
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: ls -la artifacts/
- uses: softprops/action-gh-release@v2
with:
files: artifacts/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}