Skip to content

docs: Fix Related Packages and release workflow for compliance #2

docs: Fix Related Packages and release workflow for compliance

docs: Fix Related Packages and release workflow for compliance #2

Workflow file for this run

name: Format
on:
push:
branches:
- main
concurrency:
group: format-${{ github.ref }}
cancel-in-progress: true
jobs:
swift_format:
name: swift-format
runs-on: macos-15
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.0.app
- 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
sudo cp .build/release/swift-format /usr/local/bin/
cd ..
rm -rf swift-format
- name: Format
run: swift-format format --recursive --in-place Sources Tests
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Run swift-format
branch: 'main'