Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Oct 1, 2023
1 parent a6b8cc4 commit f2b5345
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 34 deletions.
31 changes: 2 additions & 29 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Build Example

on:
push:
branches: [ develop ]
pull_request:
branches: [ main ]
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -22,31 +20,6 @@ env:

jobs:

# build-package:

# runs-on: macOS-13

# name: Package build

# steps:
# - uses: actions/checkout@v3
# - name: Select Xcode
# run: sudo xcode-select -switch /Applications/Xcode_14.4.app && /usr/bin/xcodebuild -version

# - name: Build and run tests
# run: xcodebuild clean build -scheme ${{ env.PACKAGE_NAME }} -destination 'platform=iOS Simulator,name=iPhone 14 Pro,OS=16.4' | xcpretty && exit ${PIPESTATUS[0]}

swiftpm:
name: Build SwiftPM
runs-on: macOS-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build Package
run: xcodebuild clean build -skipPackagePluginValidation -scheme ${{ env.PACKAGE_NAME }} -destination 'platform=iOS Simulator,name=iPhone 8,OS=16.2' | xcpretty && exit ${PIPESTATUS[0]}

build-iOS-example:
name: Build iOS examples
runs-on: macOS-latest
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/build-swiftpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Example

on:
workflow_dispatch:
workflow_call:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
PACKAGE_NAME: OversizeUI

jobs:

swiftpm:
name: Build SwiftPM
runs-on: macOS-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build Package
run: xcodebuild clean build -skipPackagePluginValidation -scheme ${{ env.PACKAGE_NAME }} -destination 'platform=iOS Simulator,name=iPhone 8,OS=16.2' | xcpretty && exit ${PIPESTATUS[0]}
16 changes: 16 additions & 0 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI - Pull Request
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
build-swiftpm:
name: Build SwiftPM
uses: ./.github/workflows/build-swiftpm.yml
secrets: inherit
build-example:
name: Build Examples
needs: build-swiftpm
uses: ./.github/workflows/build-example.yml
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI - Release
on:
pull_request:
types:
- closed
branches:
- main
workflow_dispatch:
jobs:
build-swiftpm:
name: Build SwiftPM
uses: ./.github/workflows/build-swiftpm.yml
secrets: inherit
build-example:
name: Build Examples
needs: build-swiftpm
uses: ./.github/workflows/build-example.yml
secrets: inherit
bump:
name: Bump version
needs: [build-swiftpm, build-example]
uses: ./.github/workflows/bump.yml
secrets: inherit
release:
name: Release
needs: [build-swiftpm, build-example, bump]
uses: ./.github/workflows/release.yml
secrets: inherit
publish-docc:
name: Publish docc
needs: [build-swiftpm, build-example, bump]
uses: ./.github/workflows/publish-docc.yml
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/publish-docc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy DocC
on:
push:
branches: ["main"]
workflow_dispatch:
workflow_call:
permissions:
contents: read
pages: write
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Release

on:
push:
tags:
- "*.*.*"
workflow_dispatch:
workflow_call:

jobs:
build:
Expand Down

0 comments on commit f2b5345

Please sign in to comment.