If you develop a bunch swift packages it may be tricky to keep CI clean and updated for all of them, but a dedicated action can reduce code duplication and simplify CI support. This repository was inspired by CI setup of The Composable Architecture.
You can include the action in your workflow to trigger on any event that GitHub actions supports.
The with portion of the workflow must be configured for the action.
Xcode version
Type: optional
Default value: 26.2
Note
To skip Select Xcode step you can use set value to __unspecified__
Formatter for the action
Type: optional
Default value: swift-format
Supported values:
swift-format
Path to custom formatter configuration
Type: optional
Default value: __unspecified__
Relative path to target directory
Type: optional
Default value: '.'
Commit message for the action
Type: optional
Default value: [format]
Branch for committing result of the action
Type: optional
Default value: main
- name: Test CoolStuff
uses: capturecontext/swift-package-action/format@3.0-beta.13
with:
xcode: 26.2
formatter: swift-format
config: .custom-config
branch: main
commit-message: Run swift-format
working-directory: '.'- name: Test CoolStuff
uses: capturecontext/swift-package-action/format@3.0-beta.13