oxios 0.1.3

Oxios Agent OS — Agent Operating System powered by oxi-sdk
name: Release

on:
  push:
    tags:
      - 'v*'

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: Build (macOS ARM64)
    runs-on: macos-latest
    steps:
      - name: Checkout oxios
        uses: actions/checkout@v4
        with:
          path: oxios

      - name: Checkout oxi
        uses: actions/checkout@v4
        with:
          repository: a7garden/oxi
          path: oxi
          ref: v0.4.4
          fetch-depth: 1

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo
        uses: Swatinem/rust-cache@v2
        with:
          shared-key: oxios-release

      - name: Build release
        working-directory: oxios
        env:
          RUST_BACKTRACE: 1
        run: cargo build --release

      - name: Strip binary (reduce size)
        working-directory: oxios
        run: strip target/release/oxios || true

      - name: Create checksums
        working-directory: oxios
        run: |
          sha256sum target/release/oxios > target/release/oxios.sha256
          echo "$(cat target/release/oxios.sha256 | awk '{print $1}')" > target/release/oxios.txt

      - name: Get version
        id: version
        working-directory: oxios
        run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: oxios-macos-arm64-${{ steps.version.outputs.VERSION }}
          path: |
            oxios/target/release/oxios
            oxios/target/release/oxios.sha256
          retention-days: 30

      - name: Create checksums
        working-directory: oxios
        run: |
          sha256sum target/release/oxios > target/release/oxios.sha256

      - name: Release
        uses: softprops/action-gh-release@v2
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: |
            oxios/target/release/oxios
            oxios/target/release/oxios.sha256
          generate_release_notes: true