From fcb58f6707b3b1274f81da5af542d870431dae93 Mon Sep 17 00:00:00 2001 From: Alexandr Romanov Date: Thu, 26 Sep 2024 23:32:30 +0300 Subject: [PATCH] Update CI # Conflicts: # .github/workflows/ci-pull-request.yml --- .github/workflows/ci-pull-request.yml | 34 +++++++++-- .github/workflows/ci-release.yml | 81 --------------------------- .github/workflows/publish-docc.yml | 37 ------------ 3 files changed, 30 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/ci-release.yml delete mode 100644 .github/workflows/publish-docc.yml diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml index f606ecc..34ca7d1 100644 --- a/.github/workflows/ci-pull-request.yml +++ b/.github/workflows/ci-pull-request.yml @@ -1,8 +1,13 @@ -name: CI - Pull Request +name: CI on: pull_request: + types: + - closed branches: - main + push: + branches: + - '**' workflow_dispatch: jobs: @@ -27,7 +32,7 @@ jobs: uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main strategy: matrix: - destination: + destination: - platform=iOS Simulator,name=iPhone 16 Pro,OS=18.0 - platform=iOS Simulator,name=iPad (10th generation),OS=18.0 with: @@ -52,7 +57,7 @@ jobs: uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main strategy: matrix: - destination: + 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: @@ -67,10 +72,31 @@ jobs: uses: oversizedev/GithubWorkflows/.github/workflows/build-app.yml@main strategy: matrix: - destination: + 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 + + publish-docc: + name: Publish docc + if: github.ref == 'refs/heads/main' + needs: bump + uses: ./.github/workflows/publish-docc.yml + secrets: inherit + diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml deleted file mode 100644 index 6bc476a..0000000 --- a/.github/workflows/ci-release.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: CI - Release -on: - pull_request: - types: - - closed - branches: - - main - workflow_dispatch: - -jobs: - build-swiftpm: - name: Build SwiftPM - uses: oversizedev/GithubWorkflows/.github/workflows/build-swiftpm.yml@main - strategy: - matrix: - packages: [OversizeUI] - with: - package: ${{ matrix.packages }} - 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 15 Pro,OS=17.2', 'platform=iOS Simulator,name=iPad Pro (12.9-inch) (6th generation),OS=17.2'] - 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=17.2', 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation) (at 1080p),OS=16.4'] - 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 (44mm) (2nd generation),OS=10.5'] - with: - path: Example/Example - scheme: Example (watchOS) - destination: ${{ matrix.destination }} - secrets: inherit - - bump: - name: Bump version - 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 - needs: bump - uses: ./.github/workflows/publish-docc.yml - secrets: inherit - diff --git a/.github/workflows/publish-docc.yml b/.github/workflows/publish-docc.yml deleted file mode 100644 index d461258..0000000 --- a/.github/workflows/publish-docc.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Deploy DocC -on: - workflow_dispatch: - workflow_call: -permissions: - contents: read - pages: write - id-token: write -concurrency: - group: "pages" - cancel-in-progress: true -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: macos-14 - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v3 - - name: Build DocC - run: | - xcodebuild docbuild -scheme -skipPackagePluginValidation OversizeUI \ - -derivedDataPath /tmp/docbuild \ - -destination 'generic/platform=iOS'; - $(xcrun --find docc) process-archive \ - transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/OversizeUI.doccarchive \ - --hosting-base-path OversizeUI \ - --output-path docs; - echo "" > docs/index.html; - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - path: 'docs' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1