Skip to content

Commit

Permalink
Merge pull request #47 from AckeeCZ/github_actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
olejnjak authored Jun 16, 2020
2 parents dd10d3a + 327e707 commit 7fa520a
Show file tree
Hide file tree
Showing 38 changed files with 664 additions and 137 deletions.
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build

on: [pull_request, push]

jobs:
tests:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: AckeeCZ/[email protected]
- uses: actions/cache@v2
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Build Carthage binary
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
carthage checkout
carthage build --platform iOS --cache-builds --no-skip-current
33 changes: 33 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname
name: Checks

on: [pull_request]

jobs:
swiftlint:
name: Swiftlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
changelog:
name: Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Changelog Reminder
uses: peterjgrainger/[email protected]
with:
changelog_regex: 'CHANGELOG.md'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
podspec:
name: Podspec
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Bundler dependencies
run: bundle install
- name: Lint podspec
run: bundle exec pod lib lint
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy

on:
push:
tags:
- '*'

jobs:
carthage:
name: Upload Carthage binary
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: AckeeCZ/[email protected]
- uses: actions/cache@v1
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Build
run: carthage build --no-skip-current --cache-builds
- name: Archive
run: carthage archive --output "ACKReactiveExtensions.framework.zip"
- uses: xresloader/upload-to-github-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ACKReactiveExtensions.framework.zip
tags: true
draft: false
cocoapods:
name: Push podspec to Cocoapods trunk
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: AckeeCZ/[email protected]
- name: Install gems
run: bundle install
- name: Push podspec
run: bundle exec pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Documentation

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Generate Documentation
uses: SwiftDocOrg/swift-doc@master
with:
inputs: "ACKReactiveExtensions"
output: "Documentation"
- name: Upload Documentation to Wiki
uses: SwiftDocOrg/github-wiki-publish-action@master
with:
path: "Documentation"
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.CI_PERSONAL_ACCESS_TOKEN }}
1 change: 1 addition & 0 deletions .github/xcode-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11.5
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ DerivedData
*.hmap
*.ipa

.build

# Bundler
.bundle

Expand Down
33 changes: 33 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
whitelist_rules:
- class_delegate_protocol
- closing_brace
- colon
- comma
- cyclomatic_complexity
- empty_enum_arguments
- file_length
- force_cast
- force_unwrapping
- function_body_length
- todo
- trailing_semicolon
- trailing_whitespace
- vertical_whitespace
- weak_delegate
- overridden_super_call
included: # paths to include during linting. `--path` is ignored if present.
- ACKReactiveExtensions
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
force_cast: warning # implicitly
function_body_length:
- 100 # warning
- 300 # error
type_body_length:
- 300 # warning
- 500 # error
file_length:
warning: 500
error: 1200
# reporter: "csv" # reporter type (xcode, json, csv, checkstyle)
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions ACKReactiveExtensions.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.3'
s.swift_version = '5.0'
s.default_subspec = 'Core','UIKit'
s.dependency 'ReactiveCocoa', '~> 10.1'
s.dependency 'ReactiveSwift', '~> 6.1'
s.dependency 'ReactiveCocoa', '~> 10.3'
s.dependency 'ReactiveSwift', '~> 6.3'

s.subspec 'Core' do |core|
core.source_files = 'ACKReactiveExtensions/Core/*.swift'
Expand All @@ -31,7 +31,7 @@ Pod::Spec.new do |s|

s.subspec 'Realm' do |realm|
realm.dependency 'ACKReactiveExtensions/Core'
realm.dependency 'RealmSwift', '~> 4.3'
realm.dependency 'RealmSwift', '~> 5.0'
realm.source_files = 'ACKReactiveExtensions/Realm/*.swift'
end

Expand Down
Loading

0 comments on commit 7fa520a

Please sign in to comment.