sharp 0.1.0

A modern, statically-typed programming language with Python-like syntax, compiled to native code via LLVM. Game engine ready!
name: Release

on:
  push:
    tags:
      - "v*"

jobs:
  release:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: macos-latest
            target: x86_64-apple-darwin
            artifact_name: sharp
            asset_name: sharp-macos-x86_64
          - os: macos-latest
            target: aarch64-apple-darwin
            artifact_name: sharp
            asset_name: sharp-macos-arm64
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            artifact_name: sharp
            asset_name: sharp-linux-x86_64
          - os: windows-latest
            target: x86_64-pc-windows-msvc
            artifact_name: sharp.exe
            asset_name: sharp-windows-x86_64.exe

    steps:
      - uses: actions/checkout@v3

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}

      - name: Install LLVM (macOS)
        if: runner.os == 'macOS'
        run: |
          brew install llvm@18
          echo "LLVM_SYS_180_PREFIX=$(brew --prefix llvm@18)" >> $GITHUB_ENV

      - name: Install LLVM (Linux)
        if: runner.os == 'Linux'
        run: |
          sudo apt-get update
          sudo apt-get install -y llvm-18 llvm-18-dev

      - name: Install LLVM (Windows)
        if: runner.os == 'Windows'
        run: |
          choco install llvm -y
          echo "LLVM_SYS_180_PREFIX=C:\Program Files\LLVM" >> $env:GITHUB_ENV

      - name: Build
        run: |
          cargo build --release --target ${{ matrix.target }}

      - name: Upload Release Asset
        uses: softprops/action-gh-release@v1
        with:
          files: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
          name: ${{ matrix.asset_name }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}