v0.12.2 - Status Bar Hotfix #12
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: Build macOS App | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| arch: [arm64, x86_64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| TAG="${{ github.event.release.tag_name }}" | |
| VERSION="${TAG#v}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Prepare Info.plist | |
| run: | | |
| sed "s/__VERSION__/${{ steps.version.outputs.version }}/g" \ | |
| cc_stats_app/swift/Info.plist > Info.plist.tmp | |
| - name: Build for ${{ matrix.arch }} | |
| run: | | |
| find cc_stats_app/swift -name "*.swift" -print0 | sort -z | \ | |
| xargs -0 swiftc \ | |
| -o CCStats \ | |
| -framework Cocoa \ | |
| -framework SwiftUI \ | |
| -framework Carbon \ | |
| -lsqlite3 \ | |
| -O \ | |
| -target ${{ matrix.arch }}-apple-macosx13.0 | |
| - name: Create .app bundle | |
| run: | | |
| APP="CCStats.app" | |
| mkdir -p "$APP/Contents/MacOS" | |
| mkdir -p "$APP/Contents/Resources" | |
| cp Info.plist.tmp "$APP/Contents/Info.plist" | |
| mv CCStats "$APP/Contents/MacOS/CCStats" | |
| chmod +x "$APP/Contents/MacOS/CCStats" | |
| - name: Package as zip (preserves permissions) | |
| run: | | |
| ditto -c -k --keepParent CCStats.app CCStats-${{ matrix.arch }}.zip | |
| - name: Upload to Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release upload ${{ github.event.release.tag_name }} \ | |
| CCStats-${{ matrix.arch }}.zip \ | |
| --clobber |