name: Gymkhana release
run-name: ${{ gitea.actor }} is releasing out Gymkhanikas de Uli 🚀
on:
  push:
    branches: [ gymkhana/main ]

env:
  GODOT_VERSION: 3.5.2
  EXPORT_NAME: gymkhana
  PROJECT_PATH: gymkhana
jobs:
  export-linux:
    name: Linux Export
    runs-on: ubuntu-latest
    container:
      image: barichello/godot-ci:3.5.2
    steps:
      - uses: actions/setup-node@v3
        with:
          # Version Spec of the version to use in SemVer notation.
          # It also emits such aliases as lts, latest, nightly and canary builds
          # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
          node-version: '16.x'
      - name: Checkout
        uses: actions/checkout@v3
        with:
          lfs: true
      - name: Setup
        run: |
          mkdir -v -p ~/.local/share/godot/templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
      - name: Linux Build
        run: |
          mkdir -v -p build/linux
          cd $PROJECT_PATH
          godot -v --export "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64
      - name: Upload Artifact
        uses: actions/upload-artifact@v1
        with:
          name: linux
          path: build/linux