Skip to content

Commit

Permalink
Merge branch 'dev' into dynamic-changes-to-deriv-auth
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/pr_title.yaml
#	.github/workflows/version.yaml
#	CHANGELOG.md
#	README.md
#	melos.yaml
#	packages/analytics/CHANGELOG.md
#	packages/analytics/lib/sdk/rudderstack/sdk/deriv_rudderstack_sdk.dart
#	packages/analytics/pubspec.yaml
#	packages/analytics/test/rudderstack/sdk/deriv_rudderstack_sdk_test.dart
#	packages/deriv_auth/CHANGELOG.md
#	packages/deriv_auth/docs/deriv_auth_layouts.md
#	packages/deriv_auth/example/lib/core/example_auth_error_state_handler.dart
#	packages/deriv_auth/example/lib/features/get_started/pages/get_started_page.dart
#	packages/deriv_auth/example/lib/features/login/pages/login_page.dart
#	packages/deriv_auth/example/lib/features/reset_pass/pages/choose_new_password_page.dart
#	packages/deriv_auth/example/lib/features/reset_pass/pages/reset_pass_success_page.dart
#	packages/deriv_auth/example/lib/features/signup/pages/set_password_page.dart
#	packages/deriv_auth/example/lib/features/signup/pages/signup_page.dart
#	packages/deriv_auth/example/pubspec.yaml
#	packages/deriv_auth/lib/core/helpers/country_selection_helper.dart
#	packages/deriv_auth/lib/core/helpers/endpoint_helper.dart
#	packages/deriv_auth/lib/core/helpers/semantic_labels.dart
#	packages/deriv_auth/lib/core/services/token/services/deriv_token_service.dart
#	packages/deriv_auth/lib/features/get_started/presentation/layouts/deriv_get_started_layout.dart
#	packages/deriv_auth/lib/features/login/presentation/layouts/deriv_login_layout.dart
#	packages/deriv_auth/lib/features/reset_password/presentation/layouts/deriv_reset_pass_layout.dart
#	packages/deriv_auth/lib/features/reset_password/presentation/layouts/deriv_success_pass_change_layout.dart
#	packages/deriv_auth/lib/features/signup/presentation/layouts/deriv_set_password_layout.dart
#	packages/deriv_auth/lib/features/signup/presentation/layouts/deriv_signup_layout.dart
#	packages/deriv_auth/pubspec.yaml
#	packages/deriv_auth/test/features/login/presentation/layouts/deriv_2fa_layout_test.dart
#	packages/deriv_auth/test/features/reset_password/presentation/layouts/deriv_choose_new_pass_layout_test.dart
#	packages/deriv_auth/test/features/reset_password/presentation/layouts/deriv_reset_pass_layout_test.dart
#	packages/deriv_auth/test/features/reset_password/presentation/layouts/deriv_success_pass_change_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/layouts/deriv_country_selection_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/layouts/deriv_email_not_received_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/layouts/deriv_set_password_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/layouts/deriv_verification_done_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/layouts/deriv_verify_email_layout_test.dart
#	packages/deriv_auth/test/features/signup/presentation/widgets/country_selection_list_widget_test.dart
#	packages/deriv_auth_ui/CHANGELOG.md
#	packages/deriv_auth_ui/lib/deriv_auth_ui.dart
#	packages/deriv_auth_ui/lib/generated/intl/messages_en.dart
#	packages/deriv_auth_ui/lib/generated/l10n.dart
#	packages/deriv_auth_ui/lib/src/features/login/widgets/deriv_social_auth_divider.dart
#	packages/deriv_auth_ui/lib/src/features/login/widgets/deriv_social_auth_panel.dart
#	packages/deriv_auth_ui/lib/src/features/reset_pass/layouts/deriv_choose_new_pass_layout.dart
#	packages/deriv_auth_ui/lib/src/features/signup/cubits/deriv_country_selection_cubit.dart
#	packages/deriv_auth_ui/lib/src/features/signup/cubits/deriv_country_selection_state.dart
#	packages/deriv_auth_ui/lib/src/features/signup/layouts/deriv_country_selection_layout.dart
#	packages/deriv_auth_ui/pubspec.yaml
#	packages/deriv_auth_ui/test/features/get_started/layouts/deriv_get_started_layout_test.dart
#	packages/deriv_auth_ui/test/features/login/layouts/deriv_login_layout_test.dart
#	packages/deriv_auth_ui/test/features/signup/cubits/deriv_country_selection_cubit_test.dart
#	packages/deriv_auth_ui/test/features/signup/layouts/deriv_signup_layout_test.dart
#	packages/deriv_date_range_picker/CHANGELOG.md
#	packages/deriv_date_range_picker/pubspec.yaml
#	packages/deriv_dependency_injector/CHANGELOG.md
#	packages/deriv_dependency_injector/pubspec.yaml
#	packages/deriv_env/CHANGELOG.md
#	packages/deriv_env/pubspec.yaml
#	packages/deriv_expandable_bottom_sheet/CHANGELOG.md
#	packages/deriv_expandable_bottom_sheet/pubspec.yaml
#	packages/deriv_language_selector/analysis_options.yaml
#	packages/deriv_localizations/lib/l10n/deriv_auth/app_en.arb
#	packages/deriv_numpad/CHANGELOG.md
#	packages/deriv_numpad/pubspec.yaml
#	packages/deriv_theme/CHANGELOG.md
#	packages/deriv_theme/pubspec.yaml
#	packages/deriv_ui/CHANGELOG.md
#	packages/deriv_ui/lib/presentation/widgets/custom_checkbox.dart
#	packages/deriv_ui/lib/widgets/base_text_field.dart
#	packages/deriv_ui/pubspec.yaml
#	packages/deriv_web_view/pubspec.yaml
#	packages/update_checker/lib/src/bloc/update_bloc.dart
#	packages/update_checker/pubspec.yaml
  • Loading branch information
anas-deriv committed May 15, 2024
2 parents 4de6437 + d4fc040 commit cbadf37
Show file tree
Hide file tree
Showing 81 changed files with 4,056 additions and 2,467 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_title.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: pr_title

on:
pull_request:
pull_request_target:
types:
- opened
- edited
Expand Down
53 changes: 4 additions & 49 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ on:
types:
- closed
branches:
- master
- dev

jobs:
version_and_tag:
runs-on: ubuntu-latest
if: >
github.event.pull_request.merged == true &&
!startsWith(github.event.pull_request.title, 'chore') &&
!startsWith(github.event.pull_request.title, 'ci') &&
!startsWith(github.event.pull_request.title, 'add')
if: github.event.pull_request.merged == true && !contains(github.event.pull_request.title, 'chore(version)')
steps:
- name: Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand All @@ -41,53 +37,12 @@ jobs:
- name: Create git tag based on version
run: melos version --all --yes

- name: Get new tags
id: new-tags
run: |
local_tags=$(git tag)
remote_tags=$(git ls-remote --tags origin | cut -d/ -f3)
new_tags=$(comm -23 <(sort <<<"$local_tags") <(sort <<<"$remote_tags"))
# Format new tags into a single line with '\n' between tags
formatted_tags=$(echo -e "$new_tags" | tr '\n' ' ')
# Append the formatted tags to the file
echo -e "NEW_TAGS=$formatted_tags" >> "$GITHUB_OUTPUT"
shell: bash

- name: Push tag
id: push-tag
run: |
output=$(git push --tags 2>&1)
if [[ $output == *"Everything up-to-date"* ]]; then
echo "PUSH_OUTPUT=No package updated" >> $GITHUB_OUTPUT
else
echo "PUSH_OUTPUT=Packages updated" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Make the script files executable
if: ${{ contains(steps.push-tag.outputs.PUSH_OUTPUT, 'Packages updated') }}
run: chmod +x readme.sh
working-directory: ./scripts

- name: Update README.md
if: ${{ contains(steps.push-tag.outputs.PUSH_OUTPUT, 'Packages updated') }}
run: bash readme.sh
working-directory: ./scripts
run: git push --tags

- name: Create Pull Request on updated changelog and pubspec file.
uses: peter-evans/create-pull-request@76c6f5c20e2111bfee3cd30fae52a25e410f5efc
with:
token: ${{ secrets.PAT }}
title: "chore(version): bump version and update changelog"
base: master

- name: Send Slack Notification
uses: ./.github/actions/send_slack_notifications
if: ${{ contains(steps.push-tag.outputs.PUSH_OUTPUT, 'Packages updated') }}
with:
SLACK_WEBHOOK_PACKAGE_UPDATE: ${{ secrets.SLACK_WEBHOOK_PACKAGE_UPDATE }}
PR_TITLE: ${{ github.event.pull_request.title }}
TAGS: ${{ steps.new-tags.outputs.NEW_TAGS }}
base: dev
Loading

0 comments on commit cbadf37

Please sign in to comment.