Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Setting up swift-format job on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
amika-sq committed Jan 3, 2024
1 parent bbaf8d0 commit 23b4d15
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches: [ "main" ]

jobs:
test:
build-and-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.9"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Format

on:
push:
branches:
- format

jobs:
swift-format:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Tap
run: brew install swift-format
- name: Format
run: make format
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Run swift-format
branch: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
format:
swift format --in-place --recursive .

0 comments on commit 23b4d15

Please sign in to comment.