ci: add GitHub Actions workflow #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Swift Format | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
swift-format: | |
runs-on: macos-14 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Xcode select | |
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer' | |
- name: Install Swift Format | |
run: brew install swift-format | |
- name: Swift Format | |
run: swift format --in-place --recursive ./Package.swift ./Sources ./Tests | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Run swift-format |