Skip to content

Commit 123aa16

Browse files
authored
Add CI Release jobs on tag push (#862)
1 parent 80216da commit 123aa16

File tree

6 files changed

+46
-13
lines changed

6 files changed

+46
-13
lines changed

.github/workflows/master.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@ on:
22
push:
33
branches:
44
- master
5+
tags:
6+
- '[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)*'
57
pull_request:
68
types: [labeled]
79
branches:
810
- master
9-
name: Verification
11+
12+
env:
13+
# Keep using Xcode 13 until CP releases the fix for watchOS verification on Xcode 14
14+
# https://github.com/CocoaPods/CocoaPods/issues/11558
15+
# https://github.com/CocoaPods/CocoaPods/pull/11660
16+
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer
17+
18+
name: Verification | Release
1019
jobs:
1120
carthage:
1221
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
13-
runs-on: macos-latest
22+
name: Carthage Verification
23+
runs-on: macos-12
1424
steps:
1525
- name: Checkout
1626
uses: actions/checkout@v2
@@ -27,8 +37,8 @@ jobs:
2737
2838
swiftpm-macos:
2939
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
30-
name: SwiftPM macOS
31-
runs-on: macos-latest
40+
name: SwiftPM macOS Verification
41+
runs-on: macos-12
3242
steps:
3343
- name: Checkout
3444
uses: actions/checkout@v2
@@ -42,15 +52,36 @@ jobs:
4252
4353
cocoapods:
4454
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }}
45-
runs-on: macos-latest
55+
name: CocoaPods Verification
56+
runs-on: macos-12
4657
steps:
4758
- name: Checkout
4859
uses: actions/checkout@v2
4960
- name: CocoaPods verification
5061
run: |
51-
# 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."
52-
# `.swift-version` is for swiftenv, not for CocoaPods, so we can't remove the file as suggested.
53-
rm .swift-version
5462
pod repo update
5563
pod lib lint --use-libraries
5664
65+
release-github:
66+
if: startsWith(github.ref, 'refs/tags/')
67+
name: GitHub Release
68+
runs-on: macos-12
69+
needs: [swiftpm-macos, cocoapods, carthage]
70+
steps:
71+
- name: git checkout
72+
uses: actions/checkout@v2
73+
- name: create release
74+
uses: softprops/action-gh-release@v1
75+
76+
release-cocoapods:
77+
if: startsWith(github.ref, 'refs/tags/')
78+
name: CocoaPods Release
79+
runs-on: macos-12
80+
needs: [swiftpm-macos, cocoapods, carthage]
81+
steps:
82+
- name: git checkout
83+
uses: actions/checkout@v2
84+
- name: pod trunk push
85+
env:
86+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
87+
run: pod trunk push

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# master
22
*Please add new entries at the top.*
33

4+
1. Add CI Release jobs on tag push (#862, kudos to @p4checo)
45
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)
56
1. Add `async` helpers to Schedulers (#857, kudos to @p4checo)
67
1. Add primary associated types to SignalProducerConvertible & SignalProducerProtocol (#855, kudos to @braker1nine)

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Quick/Nimble" "v9.2.0"
1+
github "Quick/Nimble" "v9.2.1"
22
github "Quick/Quick" "v4.0.0"
33
github "xcconfigs/xcconfigs" "1.1"

script/carthage

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ set -euo pipefail
1010
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
1111
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
1212

13-
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
13+
# For Xcode 12+ make sure EXCLUDED_ARCHS is set to arm architectures otherwise
1414
# the build will fail on lipo due to duplicate architectures.
15-
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
15+
XCODE_VERSION_MAJ=1300 # should mirror XCODE_VERSION_MAJOR - update accordingly
16+
17+
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_${XCODE_VERSION_MAJ} = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
1618
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
1719

1820
export XCODE_XCCONFIG_FILE="$xcconfig"

0 commit comments

Comments
 (0)