name: Build Go (Linux + Windows)

on:
  push:
  workflow_dispatch:

jobs:
  build:
    runs-on: docker            
    container:
      image: git.rufous-trench.ts.net/crizomb/forgejo-action-goraylib:deb13-node20-go1.24
    steps:
      - uses: actions/checkout@v4

      - name: Build binaries
        run: |
          cd src
          GOOS=linux   GOARCH=amd64 go build -o ../builds/raymarchgo-linux-amd64
          GOOS=windows GOARCH=amd64 go build -o ../builds/raymarchgo-windows-amd64.exe
      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: binaries
          path: |
            builds/raymarchgo-linux-amd64
            builds/raymarchgo-windows-amd64.exe
