on: [push]

env:
  godot_version: 4.2.1

jobs:
  Auto-Build-App:
    runs-on: docker
    steps:
        - name: Install Packages
          run: |
            apt-get update 
            apt-get install -y --no-install-recommends  zip \
            ca-certificates \
            git \
            git-lfs \
            wget \
            curl \
            zip \
            openjdk-17-jdk
        - name: Check out repository code
          uses: actions/checkout@v3
        - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
        - name: Set gradlew perms
          run: chmod +x ./gradlew
        - name: List files in the repos
          run: ls ${{ gitea.workspace }}
        - name: Init gradle
          run: ./gradlew init
        - run: echo "🖥️ The workflow is now ready to build code on the runner."
        - name: Build App
          run: |
            ./gradlew build
            ls ${{ gitea.workspace }}
        - name: List files in the repository
          run: |
            ls -lh ${{ gitea.workspace }}
        - name: Upload windows build
          uses: actions/upload-artifact@v3
          with:
            name: BuildFiles
            path: |
              ./build/libs/*.jar
              !./build/libs/*-sources.jar
        - run: echo "🍏 This job's status is ${{ job.status }}."


