Skip to content

Commit

Permalink
fix SwiftLint (#2)
Browse files Browse the repository at this point in the history
* fix validations

fix SwiftLint

* add PrivacyInfo.xcprivacy

* fix iPhone version to build

* fix bug on Xcode 16 - iOS12

* remove strict swiftlint

* fix Twiteet step on release workflow

* revert validations jobs
  • Loading branch information
lucasromanomr authored Nov 29, 2024
1 parent a65ff54 commit bace393
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 27 deletions.
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 }}
12 changes: 4 additions & 8 deletions .github/workflows/validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ on:
types: [opened, reoneped, edited, synchronized]

jobs:
SwiftLint:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint (Only files changed in the PR)
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/action-swiftlint@3.2.1
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint with --reporter
uses: norio-nomura/action-swiftlint@3.2.1
args: --reporter github-actions-logging
Danger:

danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
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

0 comments on commit bace393

Please sign in to comment.