feat: Add CI/CD workflows for automated build, test, and release proc… #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SwiftLint Code Quality Check | |
| # Runs on Ubuntu for faster execution, inspired by macos-auto-clicker-main | |
| name: SwiftLint | |
| on: | |
| push: | |
| branches: [ main, staging, dev ] | |
| paths: | |
| - '**/*.swift' | |
| - '.swiftlint.yml' | |
| - '.github/workflows/swiftlint.yml' | |
| pull_request: | |
| branches: [ main, staging, dev ] | |
| paths: | |
| - '**/*.swift' | |
| - '.swiftlint.yml' | |
| - '.github/workflows/swiftlint.yml' | |
| # Cancel previous runs when new commits are pushed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| swiftlint: | |
| name: 🔍 SwiftLint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: 📥 Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 # Only need current commit for linting | |
| - name: 🔧 Install SwiftLint | |
| run: | | |
| # Install SwiftLint using the official install script | |
| curl -sSL https://github.com/realm/SwiftLint/releases/latest/download/swiftlint_linux.zip -o swiftlint.zip | |
| unzip swiftlint.zip | |
| sudo mv swiftlint /usr/local/bin/ | |
| swiftlint version | |
| - name: 🔍 Run SwiftLint | |
| run: | | |
| echo "🔍 Running SwiftLint with strict enforcement..." | |
| swiftlint lint --strict --reporter github-actions-logging | |
| echo "✅ SwiftLint passed successfully!" | |
| - name: 📊 SwiftLint Summary | |
| if: always() | |
| run: | | |
| echo "📋 SwiftLint Analysis Complete" | |
| echo "🎯 Configuration: .swiftlint.yml" | |
| echo "📁 Scanned: Sources/" | |
| echo "🔧 Mode: Strict (warnings = errors)" |