From 02ea7c04eca920ee4df6644533dcc6c1343ca6f1 Mon Sep 17 00:00:00 2001 From: Vladimir nett00n Budylnikov Date: Wed, 1 Oct 2025 20:39:01 +0400 Subject: [PATCH] foobar --- .gitea/workflows/build.yml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index a9ce164..22e096c 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -42,9 +42,9 @@ on: default: '' type: string build_type: - description: 'Build type' + description: 'Build type release/debug' required: true - default: 'release' + default: 'debug' type: debug options: - release @@ -109,8 +109,7 @@ jobs: # Preparation job - determines build configuration prepare: name: Prepare Build - runs-on: - - "ubuntu-latest" + runs-on: ubuntu-latest outputs: platforms: ${{ steps.config.outputs.platforms }} build_type: ${{ steps.config.outputs.build_type }} @@ -148,8 +147,17 @@ jobs: echo "🔧 Using custom Android API level: ${{ github.event.inputs.android_api_level }}" fi - # Determine platforms to build - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + # Determine build type first - tags always use release + if [[ "${{ github.ref_type }}" == "tag" ]]; then + # Tag build - always release mode + build_type="release" + platforms="windows,linux,macos,android" + user_version="" + elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + # Manual dispatch - use user inputs + build_type="${{ github.event.inputs.build_type }}" + user_version="${{ github.event.inputs.version }}" + # Build platforms array from individual checkboxes platforms="" if [[ "${{ github.event.inputs.build_windows }}" == "true" ]]; then @@ -166,11 +174,8 @@ jobs: fi # Remove trailing comma platforms="${platforms%,}" - - build_type="${{ github.event.inputs.build_type }}" - user_version="${{ github.event.inputs.version }}" else - # Tag-triggered build - build all platforms + # Other triggers - build all platforms in release mode platforms="windows,linux,macos,android" build_type="release" user_version="" @@ -225,7 +230,7 @@ jobs: # Setup export templates (shared across all platform builds) setup-templates: name: Setup Export Templates - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: prepare steps: @@ -264,7 +269,7 @@ jobs: # Windows build job build-windows: name: Build Windows - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: [prepare, setup-templates] if: contains(needs.prepare.outputs.platforms, 'windows') @@ -321,7 +326,7 @@ jobs: # Linux build job build-linux: name: Build Linux - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: [prepare, setup-templates] if: contains(needs.prepare.outputs.platforms, 'linux') @@ -381,7 +386,7 @@ jobs: # macOS build job build-macos: name: Build macOS - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: [prepare, setup-templates] if: contains(needs.prepare.outputs.platforms, 'macos') @@ -438,7 +443,7 @@ jobs: # Android build job build-android: name: Build Android - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: [prepare, setup-templates] if: contains(needs.prepare.outputs.platforms, 'android') @@ -577,7 +582,7 @@ jobs: # Summary job - creates release summary summary: name: Build Summary - runs-on: ${{ env.RUNNER_OS }} + runs-on: ubuntu-latest needs: [prepare, setup-templates, build-windows, build-linux, build-macos, build-android] if: always()