Update xcodebuild.yml #6
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: macOS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: ["macos-15"] | |
| include: | |
| - os: macos-15 | |
| binary_path: build/TrayTalk.zip | |
| artifact_name: "TrayTalk.zip" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Create build directory | |
| working-directory: ${{github.workspace}} | |
| run: mkdir build | |
| - name: Build | |
| working-directory: ${{github.workspace}}/build | |
| # Execute the build. | |
| run: xcodebuild -project '../TrayTalk.xcodeproj' -config Release -scheme 'TrayTalk' -destination generic/platform=macOS -allowProvisioningUpdates -archivePath ./archive archive | |
| - name: Export archive to .app | |
| working-directory: ${{github.workspace}}/build | |
| # Exports the archive to a .app file | |
| run: xcodebuild -exportArchive -archivePath ./archive.xcarchive -exportPath ./ -exportOptionsPlist ../exportOptions.plist | xcpretty | |
| - name: Zip the exported file | |
| working-directory: ${{github.workspace}}/build | |
| # Zip the application for easier downloading | |
| run: zip -r TrayTalk.zip TrayTalk.app | |
| - name: Upload the zipped application | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| # Artifact name | |
| name: ${{ matrix.artifact_name }} | |
| # A file, directory or wildcard pattern that describes what to upload | |
| path: ${{github.workspace}}/${{matrix.binary_path}} | |
| # The desired behavior if no files are found using the provided path. | |