Skip to content

Latest commit

 

History

History
115 lines (69 loc) · 2.12 KB

File metadata and controls

115 lines (69 loc) · 2.12 KB

swift-package-action logo

swift-package-action/format

Set of predefined commands for multiplatform Swift packages.

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.

Getting started 🚀

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.


with.xcode

Xcode version

Type: optional

Default value: 26.2

Note

To skip Select Xcode step you can use set value to __unspecified__


with.formatter

Formatter for the action

Type: optional

Default value: swift-format

Supported values:

  • swift-format

with.config

Path to custom formatter configuration

Type: optional

Default value: __unspecified__


with.working-directory

Relative path to target directory

Type: optional

Default value: '.'


with.commit-message

Commit message for the action

Type: optional

Default value: [format]


with.branch

Branch for committing result of the action

Type: optional

Default value: main


🧩 Step examples:

Full:

- 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: '.'

Short:

- name: Test CoolStuff
  uses: capturecontext/swift-package-action/format@3.0-beta.13