Skip to content

[CI] Add SwiftLint and Periphery for code style and dead code check #77

[CI] Add SwiftLint and Periphery for code style and dead code check

[CI] Add SwiftLint and Periphery for code style and dead code check #77

Workflow file for this run

name: commit ci
on:
push:
branches:
- '*'
paths:
- 'sources/**'
jobs:
build:
runs-on: macos-14
steps:
- name: Checkout last commit
uses: actions/checkout@v4
with:
submodules: true
- name: Install SwiftLint
run: brew install swiftlint
- name: Lint
run: swiftlint
- name: Configure build environment
run: |
echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV
- name: Build Squirrel
run: ./action-build.sh package
- name: Install periphery
run: brew install peripheryapp/periphery/periphery
- name: Check Unused Code
run: periphery scan
- name: Upload Squirrel artifact
uses: actions/upload-artifact@v4
with:
name: Squirrel-${{ env.git_ref_name }}.zip
path: package/*.pkg
# keep 90 days
retention-days: 90