mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
1.4 KiB
1.4 KiB
Setup SwiftLint Action
A reusable GitHub Action that downloads and installs SwiftLint binary from SwiftLint releases to /usr/bin.
Usage
Basic usage
- uses: ./.github/actions/setup-swiftlint
This will install the latest version of SwiftLint.
Specify version
- uses: ./.github/actions/setup-swiftlint
with:
version: '0.58.2'
Or use version with v prefix:
- uses: ./.github/actions/setup-swiftlint
with:
version: 'v0.58.2'
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
version |
SwiftLint version (e.g., 0.58.2). If not specified, the latest version will be used |
No | latest |
Example workflow
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install SwiftLint
uses: ./.github/actions/setup-swiftlint
with:
version: '0.58.2'
- name: Run SwiftLint
run: swiftlint
Supported operating systems
- macOS
- Linux
Notes
- This action requires
sudopermissions to install the binary to/usr/bin - After installation, the
swiftlintcommand will be globally available in PATH - If the specified version does not exist, the action will fail with an error message