Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI Release jobs on tag push #862

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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