name: Release (Linux)
on:
  release:
    types:
    - created
jobs:
  appimage:
    name: Build AppImage
    runs-on: ubuntu-latest
    container: docker
    steps:
    - name: Checkout
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Build AppImage
      run: |
        docker build -t appimage-builder . -f burrow-gtk/build-aux/Dockerfile
        docker create --name temp appimage-builder
        docker cp temp:/app/burrow-gtk/build-appimage/Burrow-x86_64.AppImage .
        docker rm temp
    - name: Attach Artifacts
      uses: SierraSoftworks/gh-releases@v1.0.7
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        release_tag: ${{ github.ref_name }}
        overwrite: "true"
        files: |
          Burrow-x86_64.AppImage
