diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index c04d13533a42..1906563a0159 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -12,18 +12,16 @@ concurrency: jobs: swift_format: name: swift-format - runs-on: macos-13 + runs-on: macos-15 + permissions: + contents: write steps: - uses: actions/checkout@v4 - - name: Select Xcode 14.3 - run: sudo xcode-select -s /Applications/Xcode_14.3.app - - name: Install swift-format - run: brew install swift-format + - name: Select Xcode 16.2 + run: sudo xcode-select -s /Applications/Xcode_16.2.app - name: Format run: make format - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Run swift-format branch: 'main' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index aed9d7bf9a03..0841c412eb2b 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ format: -path '*/Documentation.docc' -prune -o \ -name '*.swift' \ -not -path '*/.*' -print0 \ - | xargs -0 swift format --ignore-unparsable-files --in-place + | xargs -0 xcrun swift-format --ignore-unparsable-files --in-place .PHONY: build-for-library-evolution format warm-simulator xcodebuild xcodebuild-raw