Skip to content

Commit

Permalink
Add CI Release jobs on tag push
Browse files Browse the repository at this point in the history
## Changes

- Update `master.yml` GH Actions workflow to be triggered on version
tag pushes (i.e. `x.y.z`, `x.y.z-rc.w`).

- Add new `release-github` and `release-cocoapods` jobs on `master.yml`
to do GH and CP releases on tag pushes, respectively.

- Update macOS image to `macos-12` and Xcode to 14.1 on `master.yml` to
be consistent with `test.yml`.

- Add some missing names to jobs and rename others.

- Update `script/carthage` to have a var with the Xcode major version
(`XCODE_VERSION_MAJOR`) on the
`EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_<XXXX>`
setting which can't be defined dynamically.

- Update Nimble to 9.2.1 to fix duplicate symbol error in Release
builds (Xcode 14).

- Keep using Xcode 13 in `master.yml` until CP releases the fix for
watchOS verification on Xcode 14:
- CocoaPods/CocoaPods#11558
- CocoaPods/CocoaPods#11660

- Remove `.swift-version` file
  • Loading branch information
p4checo committed Dec 6, 2022
1 parent 80216da commit 21c9d86
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 13 deletions.
47 changes: 39 additions & 8 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 4 additions & 2 deletions script/carthage
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 21c9d86

Please sign in to comment.