chore: remove CODE_OF_CONDUCT.md #13
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: format-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| swift_format: | |
| name: swift-format | |
| runs-on: ubuntu-latest | |
| container: swift:6.2 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache swift-format | |
| id: cache-swift-format | |
| uses: actions/cache@v4 | |
| with: | |
| path: /usr/local/bin/swift-format | |
| key: ${{ runner.os }}-swift-format-${{ hashFiles('.github/workflows/swift-format.yml') }} | |
| - name: Install swift-format | |
| if: steps.cache-swift-format.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 --branch main https://github.com/apple/swift-format.git | |
| cd swift-format | |
| swift build -c release | |
| cp .build/release/swift-format /usr/local/bin/ | |
| cd .. | |
| rm -rf swift-format | |
| - name: Format | |
| run: swift-format format --ignore-unparsable-files --recursive --in-place Sources Tests | |
| - uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: Run swift-format | |
| branch: 'main' |