-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #425 from mindbox-cloud/release/2.10.3-rc
Release/2.10.3-rc
- Loading branch information
Showing
11 changed files
with
169 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,48 +41,17 @@ jobs: | |
echo "PR_URL=$PR_URL" >> $GITHUB_ENV | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Post to a Slack channel | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: 'C06RXV161RA' | ||
payload: | | ||
{ | ||
"text": "iOS Release Branch Notification", | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "🚀 iOS Release Branch Created" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Branch Name:* *`release/${{ env.VERSION }}`*\n*Status:* Success :white_check_mark:" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "actions", | ||
"elements": [ | ||
{ | ||
"type": "button", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Pull Request" | ||
}, | ||
"url": "${{ env.PR_URL }}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
- name: Send message to LOOP | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_MOBILE_NOTIFIER_TOKEN }} | ||
LOOP_NOTIFICATION_WEBHOOK_URL: ${{ secrets.LOOP_NOTIFICATION_WEBHOOK_URL }} | ||
VERSION: ${{ github.ref_name }} | ||
run: | | ||
MESSAGE=$(cat <<EOF | ||
{ | ||
"text": "**🚀 iOS Release Branch Created**\n\n*Branch Name:* \`release/$VERSION\`\n*Build number:* $BUILD_NUMBER" | ||
} | ||
EOF) | ||
curl -X POST "$LOOP_NOTIFICATION_WEBHOOK_URL" \ | ||
-H "Content-Type: application/json" \ | ||
-d "$MESSAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- '**' | ||
|
||
jobs: | ||
unit: | ||
unit-tests: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -20,18 +20,29 @@ jobs: | |
run: gem install bundler | ||
- name: Install bundler dependencies | ||
run: bundle install | ||
- name: Install yeetd | ||
run: | | ||
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg | ||
sudo installer -pkg yeetd-normal.pkg -target / | ||
yeetd & | ||
- name: Run unit tests | ||
run: bundle exec fastlane unitTestLane | ||
|
||
set-tag: | ||
needs: [unit-tests] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Extract SDK version | ||
run: | | ||
SDK_VERSION=$(sed -n 's/^.*sdkVersion = "\(.*\)"/\1/p' SDKVersionProvider/SDKVersionProvider.swift) | ||
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV | ||
echo "Extracted SDK version: $SDK_VERSION" | ||
- name: Create tag | ||
run: | | ||
git tag ${{ env.SDK_VERSION }} | ||
git push origin ${{ env.SDK_VERSION }} | ||
logger-publish: | ||
needs: [set-tag] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- name: Update bundler | ||
run: gem install bundler | ||
- name: Install bundler dependencies | ||
|
@@ -42,83 +53,126 @@ jobs: | |
pod trunk push MindboxLogger.podspec --allow-warnings | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }} | ||
- name: Post to a Slack channel | ||
id: slack | ||
uses: slackapi/[email protected] | ||
|
||
delay: | ||
needs: [logger-publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Delay for 20 minutes | ||
run: sleep 1200 | ||
|
||
check-podspecs-with-retry: | ||
needs: [delay] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Update bundler | ||
run: gem install bundler | ||
- name: Install bundler dependencies | ||
run: bundle install | ||
- uses: nick-fields/retry@v3 | ||
with: | ||
channel-id: 'C06RXV161RA' | ||
payload: | | ||
{ | ||
"text": "iOS - release", | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "🚀 MindboxLogger has been successfuly released." | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_MOBILE_NOTIFIER_TOKEN }} | ||
timeout_minutes: 5 | ||
max_attempts: 20 | ||
command: | | ||
pod repo update | ||
pod lib lint --allow-warnings | ||
retry_on: error | ||
retry_wait_seconds: 120 | ||
|
||
publish: | ||
needs: [logger-publish] | ||
needs: [check-podspecs-with-retry] | ||
runs-on: macos-latest | ||
steps: | ||
- name: Delay for 5 minutes | ||
run: sleep 300 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
|
||
- name: Release generation | ||
run: ./.github/git-release.sh | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Update bundler | ||
run: gem install bundler | ||
- name: Install bundler dependencies | ||
run: bundle install | ||
- name: Install yeetd | ||
run: | | ||
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg | ||
sudo installer -pkg yeetd-normal.pkg -target / | ||
yeetd & | ||
- uses: actions/checkout@v4 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Update bundler | ||
run: gem install bundler | ||
- name: Install bundler dependencies | ||
run: bundle install | ||
- name: Run build | ||
run: bundle exec fastlane buildLane | ||
env: | ||
CI: true | ||
- name: Deploy to Cocoapods Mindbox/MindboxNotifications | ||
run: | | ||
pod repo update | ||
set -eo pipefail | ||
pod lib lint --allow-warnings | ||
pod trunk push Mindbox.podspec --allow-warnings | ||
pod trunk push MindboxNotifications.podspec --allow-warnings | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }} | ||
|
||
- name: Run build | ||
run: bundle exec fastlane buildLane | ||
env: | ||
CI: true | ||
- name: Deploy to Cocoapods Mindbox/MindboxNotifications | ||
run: | | ||
pod repo update | ||
set -eo pipefail | ||
pod lib lint --allow-warnings | ||
pod trunk push Mindbox.podspec --allow-warnings | ||
pod trunk push MindboxNotifications.podspec --allow-warnings | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }} | ||
release-github: | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Release generation | ||
run: ./.github/git-release.sh | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
merge: | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout develop branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: develop | ||
- name: Create Pull Request | ||
run: gh pr create --base develop --head master --title "Merge 'master' into 'develop' after release" --body "Automated Pull Request to merge 'master' into 'develop' after release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Merge Pull Request | ||
run: | | ||
pr_number=$(gh pr list --base develop --head master --json number --jq '.[0].number') | ||
gh pr merge $pr_number --merge | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout develop branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: develop | ||
- name: Create Pull Request | ||
run: gh pr create --base develop --head master --title "Merge 'master' into 'develop' after release" --body "Automated Pull Request to merge 'master' into 'develop' after release" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Merge Pull Request | ||
run: | | ||
pr_number=$(gh pr list --base develop --head master --json number --jq '.[0].number') | ||
gh pr merge $pr_number --merge | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
notify-on-error: | ||
needs: [unit-tests, set-tag, logger-publish, delay, check-podspecs-with-retry, publish, release-github, merge] | ||
runs-on: ubuntu-latest | ||
if: ${{ failure() }} | ||
steps: | ||
- name: Determine failed job | ||
id: get-failed-job | ||
run: | | ||
FAILED_JOB="None" | ||
if [[ "${{ needs.unit-tests.result }}" == "failure" ]]; then | ||
FAILED_JOB="unit-tests" | ||
elif [[ "${{ needs.set-tag.result }}" == "failure" ]]; then | ||
FAILED_JOB="set-tag" | ||
elif [[ "${{ needs.logger-publish.result }}" == "failure" ]]; then | ||
FAILED_JOB="logger-publish" | ||
elif [[ "${{ needs.delay.result }}" == "failure" ]]; then | ||
FAILED_JOB="delay" | ||
elif [[ "${{ needs.check-podspecs-with-retry.result }}" == "failure" ]]; then | ||
FAILED_JOB="check-podspecs-with-retry" | ||
elif [[ "${{ needs.publish.result }}" == "failure" ]]; then | ||
FAILED_JOB="publish" | ||
elif [[ "${{ needs.release-github.result }}" == "failure" ]]; then | ||
FAILED_JOB="release-github" | ||
elif [[ "${{ needs.merge.result }}" == "failure" ]]; then | ||
FAILED_JOB="merge" | ||
fi | ||
echo "FAILED_JOB=$FAILED_JOB" >> $GITHUB_ENV | ||
- name: Send message to LOOP | ||
env: | ||
LOOP_NOTIFICATION_WEBHOOK_URL: ${{ secrets.LOOP_NOTIFICATION_WEBHOOK_URL }} | ||
VERSION: ${{ github.ref_name }} | ||
FAILED_JOB: ${{ env.FAILED_JOB }} | ||
run: | | ||
MESSAGE=$(cat <<EOF | ||
{ | ||
"text": "**❌ iOS test Release failed**\n\nJob \"$FAILED_JOB\" failed in the pipeline\nSomething went wrong" | ||
} | ||
EOF) | ||
curl -X POST "$LOOP_NOTIFICATION_WEBHOOK_URL" \ | ||
-H "Content-Type: application/json" \ | ||
-d "$MESSAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
use_frameworks! | ||
|
||
target 'Example' do | ||
pod 'Mindbox', '2.10.2' | ||
pod 'Mindbox', '2.10.3-rc' | ||
end | ||
|
||
target 'MindboxNotificationServiceExtension' do | ||
pod 'MindboxNotifications', '2.10.2' | ||
pod 'MindboxNotifications', '2.10.3-rc' | ||
end | ||
|
||
target 'MindboxNotificationContentExtension' do | ||
pod 'MindboxNotifications', '2.10.2' | ||
pod 'MindboxNotifications', '2.10.3-rc' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.