├── LICENSE ├── README.md ├── SocialImage.png ├── SocialImage.pxd └── action.yml /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Emilio Pelaez Romero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # build-apple-platforms Action 2 | 3 | A GitHub Action to build a project for all  platforms: iOS, macOS, tvOS, watchOS and visionOS. 4 | 5 | Useful to catch compatibility issues when working on a project or framework that supports mutliple platforms. 6 | 7 | NOT useful for deployment since it only builds for simulators and doesn't support signing. 8 | 9 | Requires `macos-15` to build for visionOS 10 | 11 | Example: 12 | 13 | ```yaml 14 | name: Build Project 15 | 16 | on: 17 | push: 18 | 19 | jobs: 20 | build: 21 | runs-on: macos-15 22 | 23 | steps: 24 | - name: Checkout code 25 | uses: actions/checkout@v3 26 | 27 | - name: Build Apple Platforms Action 28 | uses: EmilioPelaez/build-apple-platforms@v1.0.0 29 | with: 30 | project: 'Example/HierarchyResponderExample.xcodeproj' 31 | scheme: 'HierarchyResponderExample' 32 | watch_scheme: 'HierarchyResponderExampleWatch' 33 | ``` 34 | -------------------------------------------------------------------------------- /SocialImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmilioPelaez/build-apple-platforms/27b197f54654044798774943ce6211e4a931dcf5/SocialImage.png -------------------------------------------------------------------------------- /SocialImage.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EmilioPelaez/build-apple-platforms/27b197f54654044798774943ce6211e4a931dcf5/SocialImage.pxd -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build Apple Platforms' 2 | description: 'Builds a project for all  platforms: iOS, macOS, watchOS, visionOS, and tvOS' 3 | author: 'Emilio Peláez' 4 | branding: 5 | icon: 'command' 6 | color: 'black' 7 | 8 | inputs: 9 | workspace: 10 | description: 'The path to the Xcode workspace file. Only one of workspace and project should be set.' 11 | required: false 12 | project: 13 | description: 'The path to the Xcode project file. Only one of workspace and project should be set.' 14 | required: false 15 | scheme: 16 | description: 'The scheme to build' 17 | required: true 18 | watch_scheme: 19 | description: 'The scheme to build the watchOS App' 20 | required: false 21 | exclude: 22 | description: 'Comma-separated list of platforms to exclude from the build, supported values: ios, mac, watch, vision, tv' 23 | required: false 24 | 25 | runs: 26 | using: 'composite' 27 | steps: 28 | - name: Apple Xcode Select 29 | uses: BoundfoxStudios/action-xcode-select@v1 30 | with: 31 | version: latest 32 | beta: false 33 | 34 | - run: echo -e "\033[33mStarting iOS build\033[0m" 35 | if: ${{ !contains(inputs.exclude, 'ios') }} 36 | shell: bash 37 | - name: Build iOS 38 | if: ${{ !contains(inputs.exclude, 'ios') }} 39 | uses: sersoft-gmbh/xcodebuild-action@v3 40 | with: 41 | workspace: ${{ inputs.workspace }} 42 | project: ${{ inputs.project }} 43 | scheme: ${{ inputs.scheme }} 44 | destination: generic/platform=iOS Simulator 45 | action: build 46 | - run: echo -e "\033[32mCompleted iOS build\033[0m" 47 | if: ${{ !contains(inputs.exclude, 'ios') }} 48 | shell: bash 49 | 50 | - run: echo -e "\033[33mStarting macOS build\033[0m" 51 | if: ${{ !contains(inputs.exclude, 'mac') }} 52 | shell: bash 53 | - name: Build macOS 54 | if: ${{ !contains(inputs.exclude, 'mac') }} 55 | uses: sersoft-gmbh/xcodebuild-action@v3 56 | with: 57 | workspace: ${{ inputs.workspace }} 58 | project: ${{ inputs.project }} 59 | scheme: ${{ inputs.scheme }} 60 | destination: generic/platform=macOS 61 | action: build 62 | build-settings: CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO 63 | - run: echo -e "\033[32mCompleted macOS build\033[0m" 64 | if: ${{ !contains(inputs.exclude, 'mac') }} 65 | shell: bash 66 | 67 | - run: echo -e "\033[33mStarting watchOS build\033[0m" 68 | if: ${{ !contains(inputs.exclude, 'watch') && inputs.watch_scheme }} 69 | shell: bash 70 | - name: Build watchOS 71 | if: ${{ !contains(inputs.exclude, 'watch') && inputs.watch_scheme }} 72 | uses: sersoft-gmbh/xcodebuild-action@v3 73 | with: 74 | workspace: ${{ inputs.workspace }} 75 | project: ${{ inputs.project }} 76 | scheme: ${{ inputs.watch_scheme }} 77 | destination: generic/platform=watchOS Simulator 78 | action: build 79 | - run: echo -e "\033[32mCompleted watchOS build\033[0m" 80 | if: ${{ !contains(inputs.exclude, 'watch') && inputs.watch_scheme }} 81 | shell: bash 82 | 83 | - run: echo -e "\033[33mStarting visionOS build\033[0m" 84 | if: ${{ !contains(inputs.exclude, 'vision') }} 85 | shell: bash 86 | - name: Build visionOS 87 | if: ${{ !contains(inputs.exclude, 'vision') }} 88 | uses: sersoft-gmbh/xcodebuild-action@v3 89 | with: 90 | workspace: ${{ inputs.workspace }} 91 | project: ${{ inputs.project }} 92 | scheme: ${{ inputs.scheme }} 93 | destination: generic/platform=visionOS Simulator 94 | action: build 95 | - run: echo -e "\033[32mCompleted visionOS build\033[0m" 96 | if: ${{ !contains(inputs.exclude, 'vision') }} 97 | shell: bash 98 | 99 | - run: echo -e "\033[33mStarting tvOS build\033[0m" 100 | if: ${{ !contains(inputs.exclude, 'tv') }} 101 | shell: bash 102 | - name: Build tvOS 103 | if: ${{ !contains(inputs.exclude, 'tv') }} 104 | uses: sersoft-gmbh/xcodebuild-action@v3 105 | with: 106 | workspace: ${{ inputs.workspace }} 107 | project: ${{ inputs.project }} 108 | scheme: ${{ inputs.scheme }} 109 | destination: generic/platform=tvOS Simulator 110 | action: build 111 | - run: echo -e "\033[32mCompleted tvOS build\033[0m" 112 | if: ${{ !contains(inputs.exclude, 'tv') }} 113 | shell: bash --------------------------------------------------------------------------------