Skip to content

Commit 7c45f7e

Browse files
committed
feat: Restructure for better support and maintenance
BREAKING CHANGE: - Moved circleci to githubci - Supports RxSwift 6.0 - Release xcframeworks
1 parent f800f43 commit 7c45f7e

File tree

95 files changed

+4408
-2400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4408
-2400
lines changed

.circleci/config.yml

-51
This file was deleted.

.github/workflows/create-release.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
if: "!contains(github.event.head_commit.message, 'skip ci')"
10+
runs-on: macos-11.0
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Fetch all tags
18+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
19+
20+
- name: Bump version
21+
run: |
22+
chmod +x ./scripts/bump-version.sh
23+
./scripts/bump-version.sh
24+
25+
# - name: Changelog
26+
# uses: scottbrenner/generate-changelog-action@master
27+
# id: Changelog
28+
# env:
29+
# REPO: ${{ github.repository }}
30+
31+
- name: Push changes
32+
uses: ad-m/github-push-action@master
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
branch: ${{ github.ref }}
36+
37+
- name: Restore SPM Cache
38+
uses: actions/cache@v1
39+
with:
40+
path: .build
41+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
42+
restore-keys: |
43+
${{ runner.os }}-spm-
44+
45+
- name: Release XCFrameworks
46+
run: |
47+
chmod +x ./scripts/xcframeworks.sh
48+
./scripts/xcframeworks.sh
49+
50+
- name: Create Release
51+
id: create_release
52+
uses: actions/create-release@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
tag_name: ${{ env.RELEASE_VERSION }}
57+
release_name: RxWebKit ${{ env.RELEASE_VERSION }}
58+
# body: |
59+
# ${{ steps.Changelog.outputs.changelog }}
60+
draft: false
61+
prerelease: false
62+
63+
- name: Upload XCFramework
64+
uses: actions/upload-release-asset@v1
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
with:
68+
upload_url: ${{ steps.create_release.outputs.upload_url }}
69+
asset_path: ./RxWebKit.xcframework.zip
70+
asset_name: RxWebKit.xcframework.zip
71+
asset_content_type: application/zip
72+
73+
- name: Deploy to Cocoapods
74+
run: |
75+
set -eo pipefail
76+
export RELEASE_VERSION="$(git describe --abbrev=0 | tr -d '\n')"
77+
RELEASE_VERSION=${RELEASE_VERSION:1}
78+
pod lib lint --allow-warnings
79+
pod trunk push --allow-warnings
80+
env:
81+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

.github/workflows/pull_request.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Lint, build and test
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: macos-11.0
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Fetch all tags
17+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
18+
19+
- name: Resolve dependencies
20+
run: |
21+
brew bundle
22+
bundle
23+
24+
- name: Danger
25+
run: |
26+
bundle exec danger
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Restore SPM Cache
31+
uses: actions/cache@v1
32+
with:
33+
path: .build
34+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
35+
restore-keys: |
36+
${{ runner.os }}-spm-
37+
38+
- name: Build and test (SPM)
39+
run: |
40+
swift build
41+
swift test
42+
43+
- name: Generate Xcodeproj
44+
run: |
45+
xcodegen
46+
47+
- name: Build Cocoapods iOS Demo
48+
run: |
49+
set -eo pipefail
50+
cd Examples
51+
xcodegen
52+
pod install --repo-update
53+
xcodebuild build -scheme 'RxWebKitDemo-iOS' -workspace 'RxWebKitDemo.xcworkspace' -sdk iphonesimulator -destination "platform=iOS simulator,name=iPhone 11"

.gitignore

+7-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
# Created by https://www.gitignore.io/api/swift
3-
4-
### Swift ###
51
# Xcode
62
#
73
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
@@ -20,6 +16,7 @@ DerivedData
2016
*.perspectivev3
2117
!default.perspectivev3
2218
xcuserdata
19+
*.swp
2320

2421
## Other
2522
*.xccheckout
@@ -31,37 +28,23 @@ xcuserdata
3128
*.hmap
3229
*.ipa
3330

34-
## Playgrounds
35-
timeline.xctimeline
36-
playground.xcworkspace
37-
38-
# Swift Package Manager
39-
#
40-
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
41-
# Packages/
42-
.build/
43-
4431
# CocoaPods
4532
#
4633
# We recommend against adding the Pods directory to your .gitignore. However
4734
# you should judge for yourself, the pros and cons are mentioned at:
48-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
4936
#
5037
Pods/
5138

5239
# Carthage
5340
#
5441
# Add this line if you want to avoid checking in source code from Carthage dependencies.
5542
Carthage/Checkouts
56-
5743
Carthage/Build
5844

59-
# fastlane
60-
#
61-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
62-
# screenshots whenever they are needed.
63-
# For more information about the recommended setup visit:
64-
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
45+
# Swift Package Manager
46+
.build
47+
Package.resolved
6548

66-
fastlane/report.xml
67-
fastlane/screenshots
49+
.DS_Store
50+
**/.idea/**

.jazzy.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
output: ../docs/RxWebKit
2+
module: RxWebKit
3+
xcodebuild_arguments:
4+
- -scheme
5+
- RxWebKit iOS

.swiftformat

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
--allman false
2+
--binarygrouping none
3+
--commas inline
4+
--comments ignore
5+
--decimalgrouping 3,6
6+
--elseposition same-line
7+
--empty void
8+
--exponentcase lowercase
9+
--exponentgrouping disabled
10+
--fractiongrouping disabled
11+
--disable blankLinesAroundMark
12+
--header ignore
13+
--hexgrouping 4,8
14+
--hexliteralcase uppercase
15+
--patternlet hoist
16+
--ifdef indent
17+
--indent 2
18+
--indentcase false
19+
--linebreaks lf
20+
--octalgrouping none
21+
--operatorfunc nospace
22+
--patternlet hoist
23+
--ranges nospace
24+
--self remove
25+
--semicolons inline
26+
--stripunusedargs closure-only
27+
--trimwhitespace always
28+
--wraparguments after-first
29+
--wrapcollections before-first
30+
--enable blankLinesBetweenScopes
31+
--enable redundantVoidReturnType
32+
--enable strongifiedSelf
33+
--enable trailingClosures
34+
--enable trailingSpace
35+
--enable typeSugar
36+
--enable spaceInsideParens
37+
--enable spaceInsideBrackets
38+
--enable spaceInsideBraces
39+
--enable spaceAroundOperators
40+
--enable spaceAroundBraces
41+
--enable redundantParens
42+
--enable redundantNilInit
43+
--enable consecutiveSpaces
44+
--enable anyObjectProtocol
45+
--disable isEmpty

.swiftlint.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
disabled_rules:
2+
- trailing_whitespace
3+
- trailing_comma
4+
- large_tuple
5+
- nesting
6+
- todo
7+
- operator_whitespace
8+
- colon
9+
- identifier_name
10+
11+
opt_in_rules: # some rules are only opt-in
12+
- empty_count
13+
- yoda_condition
14+
# Find all the available rules by running:
15+
# swiftlint rules
16+
17+
included:
18+
- Sources
19+
- Tests
20+
- Examples/RxWebKitDemo-iOS
21+
22+
# excluded: # paths to ignore during linting. Takes precedence over `included`.
23+
24+
# configurable rules can be customized from this configuration file
25+
# binary rules can set their severity level
26+
force_cast: warning # implicitly
27+
force_try:
28+
severity: warning # explicitly
29+
# rules that have both warning and error levels, can set just the warning level
30+
# implicitly
31+
line_length: 180
32+
# they can set both implicitly with an array
33+
function_body_length: 120
34+
type_body_length:
35+
- 400 # warning
36+
- 500 # error
37+
# or they can set both explicitly
38+
file_length:
39+
warning: 500
40+
error: 1200
41+
# naming rules can set warnings/errors for min_length and max_length
42+
# additionally they can set excluded names
43+
generic_type_name:
44+
min_length: 1 # only warning
45+
max_length: 30
46+
47+
type_name:
48+
min_length: 2 # only warning
49+
max_length: # warning and error
50+
warning: 100
51+
error: 120
52+
excluded: iPhone # excluded via string
53+
identifier_name:
54+
min_length:
55+
warning: 1
56+
reporter: "xcode"

RxWebKit.xcworkspace/contents.xcworkspacedata renamed to .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.versionrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"releaseCommitMessageFormat": "chore(release): {{currentTag}} [skip ci]",
3+
"compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/branches/compare/{{currentTag}}%0D{{previousTag}}",
4+
"commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}"
5+
}

Brewfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
brew "xcodegen"

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveX/RxSwift" ~> 5.0
1+
github "ReactiveX/RxSwift" ~> 6.0

Cartfile.private

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "Quick/Quick"
2-
github "Quick/Nimble"
1+
github "Quick/Quick" ~> 3.0
2+
github "Quick/Nimble" ~> 9.0

Cartfile.resolved

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Quick/Nimble" "v8.0.7"
2-
github "Quick/Quick" "v2.2.0"
3-
github "ReactiveX/RxSwift" "5.1.1"
1+
github "Quick/Nimble" "v9.0.0"
2+
github "Quick/Quick" "v3.0.0"
3+
github "ReactiveX/RxSwift" "6.0.0"

0 commit comments

Comments
 (0)