From 123aa169d1c2e1b995ecaed2d89e6b84be4b3728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pacheco=20Neves?= Date: Tue, 6 Dec 2022 19:19:43 +0000 Subject: [PATCH] Add CI Release jobs on tag push (#862) --- .github/workflows/master.yml | 47 ++++++++++++++++++++++++++++++------ .swift-version | 1 - CHANGELOG.md | 1 + Cartfile.resolved | 2 +- Carthage/Checkouts/Nimble | 2 +- script/carthage | 6 +++-- 6 files changed, 46 insertions(+), 13 deletions(-) delete mode 100644 .swift-version diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 23e300721..67d95d780 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -2,15 +2,25 @@ on: push: branches: - master + tags: + - '[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)*' pull_request: types: [labeled] branches: - master -name: Verification + +env: + # Keep using Xcode 13 until CP releases the fix for watchOS verification on Xcode 14 + # https://github.com/CocoaPods/CocoaPods/issues/11558 + # https://github.com/CocoaPods/CocoaPods/pull/11660 + DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer + +name: Verification | Release jobs: carthage: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} - runs-on: macos-latest + name: Carthage Verification + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -27,8 +37,8 @@ jobs: swiftpm-macos: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} - name: SwiftPM macOS - runs-on: macos-latest + name: SwiftPM macOS Verification + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -42,15 +52,36 @@ jobs: cocoapods: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} - runs-on: macos-latest + name: CocoaPods Verification + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 - name: CocoaPods verification run: | - # To work around the lint error: "ERROR | swift: Specification `ReactiveSwift` specifies an inconsistent `swift_version` (`4.1`) compared to the one present in your `.swift-version` file (`4.1.2`). Please remove the `.swift-version` file which is now deprecated and only use the `swift_version` attribute within your podspec." - # `.swift-version` is for swiftenv, not for CocoaPods, so we can't remove the file as suggested. - rm .swift-version pod repo update pod lib lint --use-libraries + release-github: + if: startsWith(github.ref, 'refs/tags/') + name: GitHub Release + runs-on: macos-12 + needs: [swiftpm-macos, cocoapods, carthage] + steps: + - name: git checkout + uses: actions/checkout@v2 + - name: create release + uses: softprops/action-gh-release@v1 + + release-cocoapods: + if: startsWith(github.ref, 'refs/tags/') + name: CocoaPods Release + runs-on: macos-12 + needs: [swiftpm-macos, cocoapods, carthage] + steps: + - name: git checkout + uses: actions/checkout@v2 + - name: pod trunk push + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: pod trunk push \ No newline at end of file diff --git a/.swift-version b/.swift-version deleted file mode 100644 index ef425ca98..000000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index db0771f76..02b529e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # master *Please add new entries at the top.* +1. Add CI Release jobs on tag push (#862, kudos to @p4checo) 1. Fix some issues related to locking, bumped min OS versions to iOS 10, macOS 10.12, tvOS 10, watchOS 3 (#859, kudos to @mluisbrown) 1. Add `async` helpers to Schedulers (#857, kudos to @p4checo) 1. Add primary associated types to SignalProducerConvertible & SignalProducerProtocol (#855, kudos to @braker1nine) diff --git a/Cartfile.resolved b/Cartfile.resolved index 757cf5182..bbd8eb5be 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "Quick/Nimble" "v9.2.0" +github "Quick/Nimble" "v9.2.1" github "Quick/Quick" "v4.0.0" github "xcconfigs/xcconfigs" "1.1" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index af1730dde..c93f16c25 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit af1730dde4e6c0d45bf01b99f8a41713ce536790 +Subproject commit c93f16c25af5770f0d3e6af27c9634640946b068 diff --git a/script/carthage b/script/carthage index 9547afaa1..76a0f8224 100755 --- a/script/carthage +++ b/script/carthage @@ -10,9 +10,11 @@ set -euo pipefail xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) trap 'rm -f "$xcconfig"' INT TERM HUP EXIT -# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise +# For Xcode 12+ make sure EXCLUDED_ARCHS is set to arm architectures otherwise # the build will fail on lipo due to duplicate architectures. -echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig +XCODE_VERSION_MAJ=1300 # should mirror XCODE_VERSION_MAJOR - update accordingly + +echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_${XCODE_VERSION_MAJ} = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig export XCODE_XCCONFIG_FILE="$xcconfig"