Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Oct 1, 2023
1 parent 719e79c commit 892ec2c
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 44 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-swiftpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Example

on:
workflow_dispatch:
workflow_call:

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

jobs:

build:

runs-on: macOS-13

name: Package build

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

- name: Set pipefail
run: set -euo pipefail

- name: Set Open API config
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES

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

58 changes: 14 additions & 44 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,20 @@
name: Bump version
on:
push:
branches:
- main
workflow_dispatch:
workflow_call:

jobs:

build:

runs-on: macOS-13

name: Package build

tag:
name: Create tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Select Xcode
run: sudo xcode-select -switch /Applications/Xcode_15.0.app && /usr/bin/xcodebuild -version

- name: Set pipefail
run: set -euo pipefail

- name: Set Open API config
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES

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

# tag:
# name: Create tag
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: '0'

# - name: Bump version and push tag
# uses: anothrNick/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
# WITH_V: false

# release:
# name: Create release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Release
# uses: softprops/action-gh-release@v1

with:
fetch-depth: '0'

- name: Bump version and push tag
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
WITH_V: false
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI - Push

on:
push:
branches: ["main"]
workflow_dispatch:

jobs:

build-swiftpm:
name: Build SwiftPM
uses: ./.github/workflows/build-swiftpm.yml
secrets: inherit

bump:
name: Bump version
needs: build-swiftpm
uses: ./.github/workflows/bump.yml
secrets: inherit

16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release

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

jobs:
build:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1

0 comments on commit 892ec2c

Please sign in to comment.