Skip to content

Commit

Permalink
CI cleanup (don't auto-commit formatting changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Nov 26, 2024
1 parent 1c89bdb commit 6c23fcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6c23fcc

Please sign in to comment.