ci: Testfassung als DMG bei jedem Lauf bereitstellen #1
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: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| # macos-26 ist arm64 und bringt Xcode 26 mit — beides nötig, weil die App | |
| # auf macOS 26 zielt und glassEffect nutzt. Homebrew liegt dort unter | |
| # /opt/homebrew, also genau dort, wohin OTHER_LDFLAGS zeigt. | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Werkzeuge anzeigen | |
| run: | | |
| xcodebuild -version | |
| swift --version | |
| - name: Abhängigkeiten installieren | |
| # xcbeautify ist auf dem Läufer nicht zugesichert, deshalb explizit. | |
| run: brew install libusb xcbeautify create-dmg | |
| - name: Kernlogik testen | |
| run: swift test --package-path SphairaCoreTests | |
| - name: Debug bauen | |
| run: | | |
| xcodebuild build \ | |
| -scheme "Sphaira Connect" \ | |
| -configuration Debug \ | |
| -destination 'platform=macOS,arch=arm64' \ | |
| | xcbeautify --renderer github-actions || exit ${PIPESTATUS[0]} | |
| - name: Release bauen | |
| run: | | |
| xcodebuild build \ | |
| -scheme "Sphaira Connect" \ | |
| -configuration Release \ | |
| -destination 'platform=macOS,arch=arm64' \ | |
| -derivedDataPath build \ | |
| | xcbeautify --renderer github-actions || exit ${PIPESTATUS[0]} | |
| - name: Testfassung als DMG verpacken | |
| # Damit man an einen lauffähigen Stand kommt, ohne ein Release zu | |
| # veröffentlichen. Version ist der kurze Commit-Hash, nicht 1.0 — | |
| # sonst verwechselt man Testfassungen mit echten Releases. | |
| run: | | |
| APP="build/Build/Products/Release/Sphaira Connect.app" | |
| mkdir -p dmg-src && cp -R "$APP" dmg-src/ | |
| create-dmg \ | |
| --volname "Sphaira Connect" \ | |
| --window-pos 200 120 --window-size 620 400 \ | |
| --icon-size 128 \ | |
| --icon "Sphaira Connect.app" 165 190 \ | |
| --app-drop-link 455 190 \ | |
| --no-internet-enable \ | |
| "Sphaira-Connect-${GITHUB_SHA:0:7}.dmg" dmg-src/ | |
| - name: Testfassung bereitstellen | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Sphaira-Connect-${{ github.sha }} | |
| path: '*.dmg' | |
| retention-days: 14 | |
| if-no-files-found: error |