From fb8c56c017c653871ca0e3206f41a20e75bbab24 Mon Sep 17 00:00:00 2001 From: Alexandr Romanov Date: Thu, 26 Sep 2024 23:44:57 +0300 Subject: [PATCH] Update steps # Conflicts: # .github/workflows/ci-pull-request.yml --- .github/workflows/ci-pull-request.yml | 95 --------------------------- .github/workflows/ci.yml | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 95 deletions(-) delete mode 100644 .github/workflows/ci-pull-request.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml deleted file mode 100644 index af8f61b..0000000 --- a/.github/workflows/ci-pull-request.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: CI -on: - pull_request: - types: - - closed - branches: - - main - push: - branches: - - '**' - workflow_dispatch: - -jobs: - build-swiftpm: - name: Build SwiftPM - uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main - strategy: - matrix: - destination: - - platform=iOS Simulator,name=iPhone 16,OS=18.0 - - platform=watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation),OS=11.0 - - platform=tvOS Simulator,name=Apple TV 4K (3rd generation) (at 1080p),OS=18.0 - - platform=macOS,arch=arm64 - with: - package: OversizeUI - destination: ${{ matrix.destination }} - secrets: inherit - - build-iOS-example: - name: Build iOS example - needs: build-swiftpm - uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main - strategy: - matrix: - destination: - - platform=iOS Simulator,name=iPhone 16 Pro,OS=18.0 - - platform=iOS Simulator,name=iPad (10th generation),OS=18.0 - with: - path: Example/Example - scheme: Example (iOS) - destination: ${{ matrix.destination }} - secrets: inherit - - build-macOS-example: - name: Build macOS examples - needs: build-swiftpm - uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main - with: - path: Example/Example - scheme: Example (macOS) - destination: platform=macOS,arch=arm64 - secrets: inherit - - build-tvOS-example: - name: Build tvOS examples - needs: build-swiftpm - uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main - strategy: - matrix: - destination: - - platform=tvOS Simulator,name=Apple TV 4K (3rd generation) (at 1080p),OS=18.0 - - platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=18.0 - with: - path: Example/Example - scheme: Example (tvOS) - destination: ${{ matrix.destination }} - secrets: inherit - - build-watchOS-example: - name: Build watchOS examples - needs: build-swiftpm - uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main - strategy: - matrix: - destination: - - platform=watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation),OS=11.0 - with: - path: Example/Example - scheme: Example (watchOS) - destination: ${{ matrix.destination }} - secrets: inherit - - bump: - name: Bump version - if: github.ref == 'refs/heads/main' - needs: - - build-swiftpm - - build-iOS-example - - build-macOS-example - - build-tvOS-example - - build-watchOS-example - - uses: oversizedev/GithubWorkflows/.github/workflows/bump.yml@main - secrets: inherit - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..733075d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +name: CI +on: + pull_request: + types: + - closed + branches: + - main + push: + branches: + - '**' + workflow_dispatch: + +jobs: + build-swiftpm: + name: Build SwiftPM + uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main + strategy: + matrix: + destination: + - platform=iOS Simulator,name=iPhone 16,OS=18.0 + - platform=watchOS Simulator,name=Apple Watch SE (40mm) (2nd generation),OS=11.0 + - platform=tvOS Simulator,name=Apple TV 4K (3rd generation) (at 1080p),OS=18.0 + - platform=macOS,arch=arm64 + with: + package: OversizeUI + destination: ${{ matrix.destination }} + secrets: inherit + + build-app: + name: Build examples + needs: build-swiftpm + uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main + strategy: + matrix: + platform: + - { name: "iOS Simulator", os: "iPhone 16,OS=18.0", scheme: "Example (iOS)" } + - { name: "iPad (10th generation)", os: "OS=18.0", scheme: "Example (iOS)" } + - { name: "watchOS Simulator", os: "Apple Watch SE (40mm) (2nd generation),OS=11.0", scheme: "Example (watchOS)" } + - { name: "tvOS Simulator", os: "Apple TV 4K (3rd generation) (at 1080p),OS=18.0", scheme: "Example (tvOS)" } + - { name: "macOS", os: "macOS,arch=arm64", scheme: "Example (macOS)" } + with: + path: Example/Example + scheme: ${{ matrix.platform.scheme }} + destination: platform=${{ matrix.platform.os }} + secrets: inherit + + bump: + name: Bump version + if: github.ref == 'refs/heads/main' + needs: + - build-swiftpm + - build-iOS-example + - build-macOS-example + - build-tvOS-example + - build-watchOS-example + + uses: oversizedev/GithubWorkflows/.github/workflows/bump.yml@main + secrets: inherit + + publish-docc: + name: Publish docc + if: github.ref == 'refs/heads/main' + needs: bump + uses: ./.github/workflows/publish-docc.yml + secrets: inherit +