Skip to content

Commit

Permalink
add slack
Browse files Browse the repository at this point in the history
  • Loading branch information
jyu115 committed Dec 20, 2023
1 parent 8193809 commit 9a0b6e8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ios-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ jobs:
run: bundle exec fastlane ios pod_trunk_push
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: slack notification
run: bundle exec fastlane ios slack version:${{ github.event.inputs.version_number }} changelog_section:${{ github.event.inputs.changelog_section }} slack_webhook:${{ secrets.SLACK_WEBHOOK }}
18 changes: 18 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,22 @@ platform :ios do
pod_push(path: "Iterable-iOS-AppExtensions.podspec", allow_warnings: true)
pod_push(path: "Iterable-iOS-SDK.podspec", allow_warnings: true)
end

desc "slack message"
lane :slack do |options|
version = options[:version]
changelog_section = options[:changelog_section]
slack_webhook = options[:slack_webhook]

read_changelog(
changelog_path: 'CHANGELOG.md',
section_identifier: "[#{changelog_section}]",
)
emojified_changelog = emojify_changelog # Emojify the output of `read_changelog` action

slack(
message: ":appleinc: *iOS SDK #{version}* has been released, which includes the following: #{emojified_changelog}",
slack_url: slack_webhook,
)
end
end

0 comments on commit 9a0b6e8

Please sign in to comment.