diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36c600b0..d93dbdb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,33 +1,16 @@ -name: SDK CI +name: Run Script on Merge to Develop. on: - push: + pull_request: + types: [closed] branches: - - '**' - - '!master' - - '!release-*' - paths-ignore: - - '**.md' - tags-ignore: - - '**' + - feature/MBX-3346-MindboxLoggerCI + jobs: - build: + run-script-on-merge: runs-on: macos-14 timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Update bundler - run: gem install bundler + steps: - 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 + run: echo "Pull request was merged." \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 61900dee..682fc739 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: branches: - 'master' - 'support/*' - - 'feature/MBX-3346-MindboxLoggerCI' + # - 'feature/MBX-3346-MindboxLoggerCI' tags-ignore: - '**' @@ -21,61 +21,6 @@ jobs: # - name: Run unit tests # run: bundle exec fastlane unitTestLane - logger-publish: - runs-on: macos-14 - 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 2>&1 || { - if [ $? -eq 0 ]; then - echo "Pushed to CocoaPods Trunk successfully." - elif pod trunk push MindboxLogger.podspec --allow-warnings 2>&1 | grep -q "[!] Unable to accept duplicate entry for: MindboxLogger (0.0.8)"; then - echo "Duplicate entry found, continuing as if successful." - else - echo "An error occurred." - exit 1 - fi - } - - # output=$(pod trunk push MindboxLogger.podspec --allow-warnings 2>&1) - # echo "$output" - # if echo "$output" | grep -q "Unable to accept duplicate entry for: MindboxLogger"; then - # echo "Обнаружен дубликат версии, пропускаем публикацию." - # exit 0 - # else - # echo "Ошибка при публикации, требуется вмешательство." - # echo "$output" - # exit 1 - # fi - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }} - # - name: Post to a Slack channel - # id: slack - # uses: slackapi/slack-github-action@v1.26.0 - # 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: [logger-publish] # runs-on: macos-14