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: