From 82970938310f5a7b091e5612b1a6cac78c3486c3 Mon Sep 17 00:00:00 2001 From: Lana Begunova <70295997+lana-20@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:15:43 -0700 Subject: [PATCH] CI: the release workflow builds every pull request and every push to main Until now a pull request ran nothing unless it changed the release workflow itself, so a change that broke a build or a unit test merged green and failed at the next tag. Every pull request and every push to main now builds everything, the unit tests on the way, and publishes nothing; publishing stays with v* tags. A pull request's earlier run is canceled by its next commit, and a failure on main opens an issue through failure-issue.yml. MobiumApp gains its one static check, npx tsc --noEmit, as a job of its own. --- .github/workflows/release.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebfff93..db87b07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,21 +9,40 @@ # are apps under test, never published to a store. The Flutter app's iOS # build is a debug build, since Flutter builds nothing else for a simulator. # -# A pull request that changes this file builds everything and publishes -# nothing. +# It is also the repository's CI: every pull request and every push to main +# builds everything and publishes nothing, so a change that breaks a build +# or a unit test fails before it is merged rather than at the next tag. A +# failure on main opens an issue (failure-issue.yml). name: Release on: push: + branches: [main] tags: ['v*'] pull_request: - paths: ['.github/workflows/release.yml'] workflow_dispatch: permissions: contents: read +# A pull request's earlier run is superseded by its newest commit. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: npm + - run: npm ci --no-audit --no-fund + # The repository's one static check (CLAUDE.md). + - run: npx tsc --noEmit + mobiumapp-android: runs-on: ubuntu-latest steps: @@ -145,7 +164,7 @@ jobs: release: if: startsWith(github.ref, 'refs/tags/v') - needs: [mobiumapp-android, mobiumapp-ios, mobiumtv-android, mobiumtv-tvos, flutter, appclip] + needs: [typecheck, mobiumapp-android, mobiumapp-ios, mobiumtv-android, mobiumtv-tvos, flutter, appclip] runs-on: ubuntu-latest permissions: contents: write @@ -154,7 +173,7 @@ jobs: with: path: dist merge-multiple: true - - run: sha256sum * > SHA256SUMS + - run: sha256sum -- * > SHA256SUMS working-directory: dist - run: gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" --title "MobiumApp $GITHUB_REF_NAME" --generate-notes env: