name: Build Godot Project1 on: push: tags: - 'v*' env: GODOT_VERSION: 4.4.1-stable PROJECT_NAME: keebie jobs: godot: runs-on: ubuntu-latest strategy: matrix: include: - preset: windows export_file: ${PROJECT_NAME}.exe permissions: write-all steps: - name: Checkout uses: actions/checkout@v4 with: lfs: true - name: Set environment variables run: | echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV BUILD_PATH=${GITHUB_WORKSPACE}/build echo "build=${BUILD_PATH}" >> $GITHUB_ENV echo "project_name=${PROJECT_NAME}" >> $GITHUB_ENV - name: Download Godot shell: bash run: | mkdir -p ~/godot-binary GODOT_BASENAME="Godot_v${GODOT_VERSION}_linux.x86_64" echo "Downloading ${GODOT_BASENAME}" wget -q "https://github.com/godotengine/godot/releases/download/${GODOT_VERSION}/${GODOT_BASENAME}.zip" -O ~/godot-binary/godot.zip unzip -q ~/godot-binary/godot.zip -d ~/godot-binary chmod +x ~/godot-binary/${GODOT_BASENAME} mv ~/godot-binary/${GODOT_BASENAME} ~/godot-binary/godot - name: Download and install export templates shell: bash run: | TEMPLATE_VER=$(echo ${GODOT_VERSION} | sed 's/[^a-zA-Z0-9_]/./g') mkdir -p ~/.local/share/godot/export_templates/${TEMPLATE_VER} TEMPLATES_BASENAME="Godot_v${GODOT_VERSION}_export_templates" echo "Downloading ${TEMPLATES_BASENAME}" wget -q "https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}/${TEMPLATES_BASENAME}.tpz" -O ~/templates.tpz unzip -q ~/templates.tpz -d ~/.local/share/godot/export_templates/temp mkdir -p ~/.local/share/godot/export_templates/${TEMPLATE_VER} mv ~/.local/share/godot/export_templates/temp/templates/* ~/.local/share/godot/export_templates/${TEMPLATE_VER}/ - name: Export project id: export shell: bash run: | echo "Building for ${{ matrix.preset }}" mkdir -p ${{ env.build }}/${{ matrix.preset }} cd ${GITHUB_WORKSPACE} ~/godot-binary/godot --export-release "${{ matrix.preset }}" --headless ${{ env.build }}/${{ matrix.preset }}/${{ matrix.export_file }} - name: Zip uses: montudor/action-zip@v0.1.1 with: args: >- zip --junk-paths --recurse-paths ${{ env.build }}/${{ env.project_name }}-${{ env.version }}-${{ matrix.preset }}.zip ${{ env.build }}/${{ matrix.preset }} - name: Release uses: akkuman/gitea-release-action@v1 with: files: ${{ env.build }}/*.zip