iOS: Add code blanks onboarding for 47329 step (#1158) #462
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
name: Automerge develop into release | |
on: | |
push: | |
branches: | |
- "develop" | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
files-changed: | |
if: ${{ vars.IS_AUTOMERGE_ENABLED == 'true' }} | |
name: Detect changes | |
uses: ./.github/workflows/detect_changed_files_reusable_workflow.yml | |
with: | |
base: ${{ github.ref }} | |
automerge: | |
needs: files-changed | |
name: Automerge | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_PAT }} | |
- name: Setup Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: "3.3.0" | |
bundler-cache: true | |
working-directory: "./iosHyperskillApp" | |
- name: Merge | |
run: | | |
set -e | |
echo "Getting latest tag without v* prefix..." | |
current_version_number=$(git tag --sort=committerdate | tail -1) | |
if [[ $current_version_number == v* ]]; then | |
current_version_number=${current_version_number:1} | |
fi | |
echo "Current version number is $current_version_number" | |
major=$(echo $current_version_number | cut -d. -f1) | |
minor=$(echo $current_version_number | cut -d. -f2) | |
patch=$(echo $current_version_number | cut -d. -f3) | |
echo "MAJOR: $major" | |
echo "MINOR: $minor" | |
echo "PATCH: $patch" | |
echo "Incrementing minor version number..." | |
next_minor=$((minor + 1)) | |
next_version_number=$(printf "%d.%d" $major $next_minor) | |
echo "Next version number is $next_version_number" | |
git config user.name github-actions | |
git config user.email [email protected] | |
echo "Checking for existing release branch with next version number $next_version_number..." | |
if [ -n "$(git ls-remote --heads origin release/$next_version_number)" ]; then | |
echo "Found existing release/$next_version_number branch" | |
git checkout release/$next_version_number | |
git merge --no-edit origin/develop | |
increment_option="--both" | |
if [ ${{ needs.files-changed.outputs.shared }} == 'true' ] | |
then | |
echo "Shared files changed" | |
elif [ ${{ needs.files-changed.outputs.android }} == 'true' ] && [ ${{ needs.files-changed.outputs.ios }} == 'true' ] | |
then | |
echo "Android and iOS files changed" | |
elif [ ${{ needs.files-changed.outputs.android }} == 'true' ] | |
then | |
echo "Android files changed" | |
increment_option="--android" | |
elif [ ${{ needs.files-changed.outputs.ios }} == 'true' ] | |
then | |
echo "iOS files changed" | |
increment_option="--ios" | |
else | |
echo "No files changed" | |
fi | |
./increment_build_number.sh $increment_option | |
git push origin release/$next_version_number | |
else | |
echo "No existing release/$next_version_number branch found" | |
echo "Creating new release/$next_version_number branch" | |
./setup_new_release_branch.sh $next_version_number | |
fi |