chore: open-source setup — CI/CD, SDD, tests, release automation #17
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Ensure the PR title is a valid Conventional Commit (it becomes the squash commit | |
| # that drives release-please). | |
| pr-title: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| steps: | |
| - uses: amannn/action-semantic-pull-request@v5 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| format: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: swift-format lint | |
| run: xcrun swift-format lint --strict --recursive Mounty MountyTests | |
| build-test: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Show toolchain | |
| run: xcodebuild -version && swift --version | |
| - name: Build & test | |
| run: | | |
| xcodebuild \ | |
| -project Mounty.xcodeproj \ | |
| -scheme Mounty \ | |
| -configuration Debug \ | |
| -destination 'platform=macOS' \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| clean test |