From 6c23fcc71c8790b50a2d17596d525643783757c6 Mon Sep 17 00:00:00 2001 From: Ian Wagner Date: Wed, 27 Nov 2024 00:48:44 +0900 Subject: [PATCH] CI cleanup (don't auto-commit formatting changes) --- .github/workflows/android.yml | 9 +-------- .github/workflows/ios.yml | 10 ++++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 63651ef8..06537624 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,8 +12,6 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }}-android-build cancel-in-progress: true - permissions: - contents: write # To auto-commit ktfmtFormat changes steps: - uses: actions/checkout@v4 @@ -39,13 +37,8 @@ jobs: working-directory: android - name: Run ktfmtFormat - run: ./gradlew ktfmtFormat + run: ./gradlew ktfmtCheck working-directory: android - - - name: Commit changed Kotlin source (it is easy to forget ktfmtFormat) - uses: stefanzweifel/git-auto-commit-action@v5 - with: - file_pattern: 'android/**/*.kt' - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 81cc7e19..23c4d06c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Ensure that Package.swift is NOT configured for local development at this stage (easy to forget) - run: sed -i '' 's/let useLocalFramework = true/let useLocalFramework = false/' Package.swift + run: ! grep -q 'let useLocalFramework = true' Package.swift && ! grep -q 'let useLocalMapLibreSwiftUIDSL = true' Package.swift - name: Commit changed files (it is easy to forget useLocalFramework in Package.swift) uses: stefanzweifel/git-auto-commit-action@v5 @@ -56,9 +56,11 @@ jobs: run: sed -i '' 's/let useLocalFramework = true/let useLocalFramework = false/' Package.swift - name: Commit changed files (it is easy to forget about ferrostar.swift) - uses: stefanzweifel/git-auto-commit-action@v5 - with: - file_pattern: 'apple/Sources/UniFFI/*' + run: | + if [[ -n "$(git status --porcelain apple/Sources/UniFFI/*)" ]]; then + echo "Dirty files detected" + exit 1 + fi - name: 'Upload Artifact' uses: actions/upload-artifact@v4