From 23c518adb52625dc3846af2305014cd6abf54e60 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 6 Jul 2026 11:31:57 +0300 Subject: [PATCH] chore: Remove build pull request and do compile check if needed in release.yml --- .github/workflows/build_pull_request.yml | 29 ------------------------ .github/workflows/release.yml | 28 ++++++++--------------- 2 files changed, 10 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/build_pull_request.yml diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml deleted file mode 100644 index 24505403b..000000000 --- a/.github/workflows/build_pull_request.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Build pull request - -on: - workflow_dispatch: - pull_request: - branches: - - dev - -jobs: - release: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: '21' - - - name: Cache Gradle - uses: burrunan/gradle-cache-action@v3 - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./gradlew :patches:buildAndroid --no-daemon diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9759182a..45d8fdc1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,9 +3,6 @@ name: Release on: workflow_dispatch: push: - branches: - - main - - dev jobs: release: @@ -28,21 +25,6 @@ jobs: distribution: 'temurin' java-version: '21' - # Verify the build isn't broken. This is required for - # chore commits where semantic release doesn't run. - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./gradlew :patches:buildAndroid - - # Cleaning up is necessary otherwise semantic release will create two artifacts, - # One artifact of the current release number and a second of the new release. - # Semantic release runs its own compilation step and - - name: Cleanup build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./gradlew clean - - name: Setup Node.js uses: actions/setup-node@v6 with: @@ -52,6 +34,8 @@ jobs: - name: Install dependencies run: npm install + # Semantic release runs its own Gradle build command. + # Only dev and main branch will generate a release as specified by .releaserc - name: Release uses: cycjimmy/semantic-release-action@v5 id: release @@ -64,3 +48,11 @@ jobs: with: subject-name: 'Morphe Patches ${{ steps.release.outputs.new_release_git_tag }}' subject-path: patches/build/libs/patches-*.mpp + + # Always verify compilation when semantic-release did not publish a release. + # This covers non-main/dev branches, chore commits, docs commits, etc. + - name: Verify it compiles + if: steps.release.outputs.new_release_published != 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew :patches:buildAndroid clean --no-daemon