diff --git a/.github/workflows/ios-sdk-release.yml b/.github/workflows/ios-sdk-release.yml index c3da5a5e..2e1ab36b 100644 --- a/.github/workflows/ios-sdk-release.yml +++ b/.github/workflows/ios-sdk-release.yml @@ -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 }} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 46842e7d..704c49fa 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -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 \ No newline at end of file