From 268edb7f83b3426e263f2ef8ad21ea22d7f3df96 Mon Sep 17 00:00:00 2001 From: florianvazelle Date: Sat, 9 Sep 2023 14:39:54 +0200 Subject: [PATCH] ci: fix build --- .github/workflows/build.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83ffbc6..8089faf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,21 +7,7 @@ on: workflow_dispatch: jobs: - pre_check: - runs-on: ubuntu-22.04 - - name: Pre-check - steps: - - name: Ensure version is bump for tag - run: | - game_version=$(cat .version) - if [[ "${{ github.ref }}" =~ ^refs/tags/* ]]; then - echo "A tag is pushed" - [ "$game_version" == "$GITHUB_REF_NAME" ] && echo "The version file is correct" || exit 2 - fi - build: - needs: pre_check runs-on: ubuntu-20.04 timeout-minutes: 30 @@ -50,6 +36,11 @@ jobs: echo "game_version=$(cat .version)" >> $GITHUB_ENV echo "godot_version=$(cat .godot_version)" >> $GITHUB_ENV ./bump_version.sh + + - name: Ensure version is equal to tag + if: startsWith(github.ref, 'refs/tags/v') + run: | + [ "${{ env.game_version }}" == "$GITHUB_REF_NAME" ] || exit 2 - name: Export Marble uses: ./.github/actions/export-game