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

Fix iOS12 on Xcode16 and Update Github Actions Workflow for Validations and Build #586

Closed
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
27 changes: 21 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
build-config:
- { scheme: 'SkeletonView iOS', destination: 'platform=iOS Simulator,name=iPhone 8', sdk: 'iphonesimulator' }
- { scheme: 'SkeletonView tvOS', destination: 'platform=tvOS Simulator,name=Apple TV', sdk: 'appletvsimulator' }
- { scheme: 'iOS Example', destination: 'platform=iOS Simulator,name=iPhone 8', sdk: 'iphonesimulator' }
- { scheme: 'tvOS Example', destination: 'platform=tvOS Simulator,name=Apple TV', sdk: 'appletvsimulator' }
build-config:
- {
scheme: "SkeletonView iOS",
destination: "platform=iOS Simulator,name=iPhone 15",
sdk: "iphonesimulator",
}
- {
scheme: "SkeletonView tvOS",
destination: "platform=tvOS Simulator,name=Apple TV",
sdk: "appletvsimulator",
}
- {
scheme: "iOS Example",
destination: "platform=iOS Simulator,name=iPhone 15",
sdk: "iphonesimulator",
}
- {
scheme: "tvOS Example",
destination: "platform=tvOS Simulator,name=Apple TV",
sdk: "appletvsimulator",
}
steps:
- uses: actions/checkout@v2
- name: Build
run: xcodebuild clean build -workspace 'SkeletonView.xcworkspace' -scheme '${{ matrix.build-config['scheme'] }}' -sdk '${{ matrix.build-config['sdk'] }}' -destination '${{ matrix.build-config['destination'] }}'

34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Release
on: [workflow_dispatch]

jobs:
release_version:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2

- name: Publish release
id: publish_release
uses: release-drafter/release-drafter@v5
with:
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update podspec
- name: Update podspec
run: fastlane bump_version next_version:${{ steps.publish_release.outputs.tag_name }}

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: 'main'
commit_message: 'Bump version ${{ steps.publish_release.outputs.tag_name }}'
branch: "main"
commit_message: "Bump version ${{ steps.publish_release.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy to Cocoapods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push --allow-warnings
pod trunk push --allow-warnings

- name: Tweet the release
uses: ethomson/send-tweet-action@v1
uses: nearform-actions/github-action-notify-twitter@master
with:
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
status: |
message: |
🎉 New release ${{ steps.publish_release.outputs.tag_name }} is out 🚀
Check out all the changes here:
${{ steps.publish_release.outputs.html_url }}
${{ steps.publish_release.outputs.html_url }}
twitter-app-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
27 changes: 9 additions & 18 deletions .github/workflows/validations.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
name: Validations

on:
on:
pull_request_target:
branches: [main]
types: [opened, reoneped, edited, synchronized]

# workflow_dispatch:
# inputs:
# commit hash:
# description: "Commit hash"
# required: true
# default: ""

jobs:
lint:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run SwiftLint
run: swiftlint lint --reporter github-actions-logging
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/[email protected]

danger:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Danger
uses: docker://frmeloni/danger-swift-with-swiftlint:1.3.1
uses: 417-72KI/danger-swiftlint@v5.10 # Look at the `Note for version`
with:
args: --failOnErrors --verbose
args: --failOnErrors --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


1 change: 1 addition & 0 deletions SkeletonView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Pod::Spec.new do |s|
s.swift_version = "5.0"
s.source = { :git => "https://github.com/Juanpe/SkeletonView.git", :tag => s.version.to_s }
s.source_files = "SkeletonViewCore/Sources/**/*.{swift,h}"
s.resource_bundles = {"SkeletonView" => ["SkeletonViewCore/Sources/Supporting Files/PrivacyInfo.xcprivacy"]}
end
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ public class SkeletonAnimationBuilder {
let animGroup = CAAnimationGroup()
animGroup.animations = [startPointAnim, endPointAnim]
animGroup.duration = duration
animGroup.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeIn)
animGroup.repeatCount = .infinity
animGroup.autoreverses = autoreverses
animGroup.isRemovedOnCompletion = false

if #available(iOS 12.0, *) {
animGroup.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeIn)
} else {
animGroup.timingFunction = CAMediaTimingFunction(controlPoints: 0.42, 0.0, 1.0, 1.0)
}

return animGroup
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ public extension CALayer {
// swiftlint:disable:next force_unwrapping
pulseAnimation.toValue = UIColor(cgColor: backgroundColor!).complementaryColor.cgColor
pulseAnimation.duration = 1
pulseAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
pulseAnimation.autoreverses = true
pulseAnimation.repeatCount = .infinity
pulseAnimation.isRemovedOnCompletion = false

if #available(iOS 12.0, *) {
pulseAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
} else {
pulseAnimation.timingFunction = CAMediaTimingFunction(controlPoints: 0.42, 0.0, 0.58, 1.0)
}
return pulseAnimation
}

Expand Down
Loading