name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0

    - name: Setup .NET
      uses: actions/setup-dotnet@v3
      with:
        dotnet-version: '9.0.x'

    - name: Restore dependencies
      run: dotnet restore Firefly.sln

    - name: Build
      run: |
        chmod +x build-all.sh
        ./build-all.sh

    - name: Create Release
      uses: softprops/action-gh-release@v1
      with:
        name: Firefly v1.0.0 - Initial Release
        body: |
          # Firefly v1.0.0 - Initial Release
          
          We're excited to announce the initial release of Firefly! This version includes the core functionality of our application.

          ## Features
          - Native library support for enhanced performance
          - Self-contained executable builds
          - Cross-platform compatibility (Linux, macOS)

          ## Installation
          Choose the appropriate build for your platform from the assets below.

          ## System Requirements
          - .NET 9.0 Runtime (for non-self-contained builds)
          - Linux x64, macOS x64, or Windows x64

          ## Known Issues
          - None reported

          ## What's Next
          - Additional platform support
          - Performance optimizations
          - Enhanced documentation

          ## Feedback
          We welcome your feedback and bug reports. Please use the issue tracker to report any problems.
        files: |
          artifacts/exe/*
          artifacts/native/*
        draft: false
        prerelease: false 