diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8f82be00..be6cbc9c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -275,13 +275,21 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" nightly-submodules: - # Always runs (cheap) so the build jobs' `needs:` never short-circuits - # them. Only does real work on the nightly cron or `submodules=latest`: - # resolves every submodule, recursively, to its upstream master and + # Only runs in latest mode: the nightly cron or `submodules=latest`. + # Resolves every submodule, recursively, to its upstream master and # reports whether anything moved relative to the committed pointers. # Build jobs check out exactly these SHAs so every leg tests the same # tips even when they start minutes apart. Nothing is committed. + # + # On every other trigger this job is skipped, so ordinary pushes, PRs and + # release tags do not queue a runner to do nothing. Its dependents carry + # `!cancelled()` so a skipped dependency does not cascade into skipping + # them, and they read its outputs as empty, which their conditions and + # `name:` expressions already treat as pinned mode. name: Resolve latest submodule tips (nightly) + if: >- + (github.event_name == 'schedule' && github.event.schedule == '0 3 * * *') + || inputs.submodules == 'latest' runs-on: ubuntu-latest outputs: latest: ${{ steps.resolve.outputs.latest }} @@ -379,8 +387,10 @@ jobs: # Normal triggers as before; additionally the nightly cron, but only when # a submodule actually moved off its committed pointer. if: >- - github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true') + !cancelled() + && contains(fromJSON('["success", "skipped"]'), needs.nightly-submodules.result) + && (github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true')) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v7 @@ -446,13 +456,15 @@ jobs: run: python3 -m pytest scripts/tests/test_generate_latest_json.py scripts/tests/test_configure_tauri_release.py -q build-qt: - name: Build Qt artifacts${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} + name: Build Qt artifacts (${{ matrix.os }}${{ (matrix.research || (github.event_name == 'workflow_dispatch' && inputs.edition == 'research') || endsWith(github.ref_name, '-research')) && ', research' || '' }})${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} needs: nightly-submodules # Normal triggers as before; additionally the nightly cron, but only when # a submodule actually moved off its committed pointer. if: >- - github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true') + !cancelled() + && contains(fromJSON('["success", "skipped"]'), needs.nightly-submodules.result) + && (github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true')) runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} env: @@ -804,13 +816,15 @@ jobs: path: dist/activitywatch-*.* build-qt-manylinux-2-28: - name: Build Qt artifacts (manylinux_2_28 — glibc 2.28 ABI floor)${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} + name: Build Qt artifacts (manylinux_2_28 — glibc 2.28 ABI floor${{ ((github.event_name == 'workflow_dispatch' && inputs.edition == 'research') || endsWith(github.ref_name, '-research')) && ', research' || '' }})${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} needs: nightly-submodules # Normal triggers as before; additionally the nightly cron, but only when # a submodule actually moved off its committed pointer. if: >- - github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true') + !cancelled() + && contains(fromJSON('["success", "skipped"]'), needs.nightly-submodules.result) + && (github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true')) runs-on: ubuntu-22.04 container: image: quay.io/pypa/manylinux_2_28_x86_64 @@ -1110,13 +1124,15 @@ jobs: path: dist/activitywatch-*.* build-tauri: - name: Build Tauri artifacts${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} + name: Build Tauri artifacts (${{ matrix.os }}${{ (matrix.research || (github.event_name == 'workflow_dispatch' && inputs.edition == 'research') || endsWith(github.ref_name, '-research')) && ', research' || '' }})${{ needs.nightly-submodules.outputs.latest == 'true' && ' [latest submodules]' || '' }} needs: nightly-submodules # Normal triggers as before; additionally the nightly cron, but only when # a submodule actually moved off its committed pointer. if: >- - github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true') + !cancelled() + && contains(fromJSON('["success", "skipped"]'), needs.nightly-submodules.result) + && (github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + || (needs.nightly-submodules.outputs.latest == 'true' && needs.nightly-submodules.outputs.moved == 'true')) runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} env: