-
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 #398 from mindbox-cloud/release/2.10.0
Release/2.10.0
- Loading branch information
Showing
20 changed files
with
401 additions
and
155 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
podspec_file="Mindbox.podspec" | ||
version=$(grep -E '^\s+spec.version\s+=' "$podspec_file" | cut -d'"' -f2) | ||
|
||
is_beta=false | ||
if [[ $version == *"rc"* ]]; then | ||
is_beta=true | ||
fi | ||
|
||
branch=${GITHUB_REF#refs/heads/} | ||
|
||
echo "Version: $version" | ||
echo "Is Beta: $is_beta" | ||
echo "Branch: $branch" | ||
|
||
echo "Fetching tags from remote repository." | ||
git fetch --tags | ||
|
||
if git rev-parse "$version" >/dev/null 2>&1; then | ||
echo "Local tag $version already exists." | ||
else | ||
echo "Creating local tag $version." | ||
git tag $version | ||
fi | ||
|
||
if git ls-remote --tags origin | grep -q "refs/tags/$version"; then | ||
echo "Remote tag $version already exists." | ||
else | ||
echo "Pushing local tag $version to remote." | ||
git push origin $version | ||
fi | ||
|
||
# Create release | ||
release_title="Release $version" | ||
text="Autogenerated release. Check more details at https://developers.mindbox.ru/docs/ios-sdk-integration" | ||
|
||
echo "Release title: $release_title" | ||
echo "Text: $text" | ||
|
||
prerelease_flag=$([ "$is_beta" = true ] && echo "--prerelease" || echo "") | ||
|
||
gh release create "$version" --target "$branch" --title "$release_title" --notes "$text" $prerelease_flag | ||
|
||
echo "Release $version created for repo on branch $branch" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,38 +10,114 @@ on: | |
|
||
jobs: | ||
unit: | ||
runs-on: macos-14 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | ||
- 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: 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 | ||
|
||
logger-publish: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Update bundler | ||
run: gem install bundler | ||
- name: Install bundler dependencies | ||
run: bundle install | ||
- name: Deploy to Cocoapods MindboxLogger | ||
run: | | ||
pod lib lint MindboxLogger.podspec --allow-warnings | ||
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] | ||
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 }} | ||
|
||
publish: | ||
needs: [unit] | ||
runs-on: macos-14 | ||
needs: [logger-publish] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | ||
- name: Delay for 2 minutes | ||
run: sleep 120 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
|
||
- name: Release generation | ||
run: ./git-release.sh "${{ github.event.head_commit.message }}" "${{secrets.GITHUBACCESSTOKEN}}" "${{secrets.GITHUBUSER}}" | ||
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: Select Xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app | ||
- 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 build | ||
run: bundle exec fastlane buildLane | ||
env: | ||
CI: true | ||
- name: Deploy to Cocoapods | ||
- name: Deploy to Cocoapods Mindbox/MindboxNotifications | ||
run: | | ||
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 }} | ||
|
||
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 }} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
use_frameworks! | ||
|
||
target 'Example' do | ||
pod 'Mindbox', '2.10.0-rc' | ||
pod 'Mindbox', '2.10.0' | ||
end | ||
|
||
target 'MindboxNotificationServiceExtension' do | ||
pod 'MindboxNotifications', '2.10.0-rc' | ||
pod 'MindboxNotifications', '2.10.0' | ||
end | ||
|
||
target 'MindboxNotificationContentExtension' do | ||
pod 'MindboxNotifications', '2.10.0-rc' | ||
pod 'MindboxNotifications', '2.10.0' | ||
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
Oops, something went wrong.