name: Build All

on:
  push:
    tags:
      - '*.*.*'

jobs:
  build-and-release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Build all variants
        run: bash scripts/build-all.sh

      - name: Create Release
        uses: softprops/action-gh-release@v1
        with:
          name: Release ${{ github.ref_name }}
          files: |
            output/OmniNX-Light-*.zip
            output/OmniNX-Standard-*.zip
            output/OmniNX-OC-*.zip
          generate_release_notes: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
