diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..da5e4c3 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: macos-latest + + strategy: + matrix: + platform: [ios, macos, watchos, tvos] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Swift + uses: fwal/setup-swift@v1 + with: + swift-version: '5.9' + + - name: Build for ${{ matrix.platform }} + run: | + case ${{ matrix.platform }} in + ios) + swift build --destination 'platform=iOS Simulator,OS=14.0,name=iPhone 11' + ;; + macos) + swift build --destination 'platform=macOS,arch=x86_64' + ;; + watchos) + swift build --destination 'platform=watchOS Simulator,OS=7.0,name=Apple Watch Series 5' + ;; + tvos) + swift build --destination 'platform=tvOS Simulator,OS=14.0,name=Apple TV' + ;; + esac \ No newline at end of file