From 1525d9d8ed5d0306dc32fafab54c51508215fd0a Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Fri, 17 Oct 2025 11:50:43 -0500 Subject: [PATCH] remove race condition by making it only possible to start from version bump or merge to main --- .github/workflows/release.yml | 36 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5e2eb8..64a1fc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,8 +33,6 @@ on: options: - "bump-version" - "merge-develop-to-main" - - "build-artifacts" - - "do-release" permissions: contents: write @@ -428,7 +426,8 @@ jobs: if: | ${{ always() && - (github.event.inputs.start_from_step == 'bump-version' || github.event.inputs.start_from_step == 'merge-develop-to-main') && + (github.event.inputs.start_from_step == 'bump-version' || + github.event.inputs.start_from_step == 'merge-develop-to-main') && needs.merge-develop-to-main.result == 'success' }} runs-on: ubuntu-latest @@ -541,9 +540,8 @@ jobs: always() && contains(github.event.inputs.jobs, 'build-windows') && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts') && - (needs.wait-for-main-pr.result == 'success' || needs.wait-for-main-pr.result == 'skipped') + github.event.inputs.start_from_step == 'merge-develop-to-main') && + needs.wait-for-main-pr.result == 'success' }} runs-on: windows-latest steps: @@ -636,9 +634,8 @@ jobs: always() && contains(github.event.inputs.jobs, 'build-debian') && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts') && - (needs.wait-for-main-pr.result == 'success' || needs.wait-for-main-pr.result == 'skipped') + github.event.inputs.start_from_step == 'merge-develop-to-main') && + needs.wait-for-main-pr.result == 'success' }} permissions: contents: read @@ -753,9 +750,8 @@ jobs: always() && contains(github.event.inputs.jobs, 'build-arch') && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts') && - (needs.wait-for-main-pr.result == 'success' || needs.wait-for-main-pr.result == 'skipped') + github.event.inputs.start_from_step == 'merge-develop-to-main') && + needs.wait-for-main-pr.result == 'success' }} permissions: contents: read @@ -888,9 +884,8 @@ jobs: always() && contains(github.event.inputs.jobs, 'build-rhel') && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts') && - (needs.wait-for-main-pr.result == 'success' || needs.wait-for-main-pr.result == 'skipped') + github.event.inputs.start_from_step == 'merge-develop-to-main') && + needs.wait-for-main-pr.result == 'success' }} permissions: contents: read @@ -1002,8 +997,7 @@ jobs: ${{ always() && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts') && + github.event.inputs.start_from_step == 'merge-develop-to-main') && needs.wait-for-main-pr.result == 'success' && (needs.build-windows.result == 'failure' || needs.build-debian.result == 'failure' || @@ -1080,9 +1074,7 @@ jobs: ${{ always() && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts' || - github.event.inputs.start_from_step == 'do-release') && + github.event.inputs.start_from_step == 'merge-develop-to-main') && needs.rollback-on-build-failure.result != 'failure' && (needs.build-windows.result == 'success' || needs.build-windows.result == 'skipped') && (needs.build-debian.result == 'success' || needs.build-debian.result == 'skipped') && @@ -1159,9 +1151,7 @@ jobs: ${{ always() && (github.event.inputs.start_from_step == 'bump-version' || - github.event.inputs.start_from_step == 'merge-develop-to-main' || - github.event.inputs.start_from_step == 'build-artifacts' || - github.event.inputs.start_from_step == 'do-release') && + github.event.inputs.start_from_step == 'merge-develop-to-main') && needs.rollback-on-build-failure.result != 'failure' && (needs.build-windows.result == 'success' || needs.build-windows.result == 'skipped') && (needs.build-debian.result == 'success' || needs.build-debian.result == 'skipped') &&