From 210d35865e00a7c803e9f442ce950a7a805d418f Mon Sep 17 00:00:00 2001 From: sahani-deriv <125638269+sahani-deriv@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:42:58 +0800 Subject: [PATCH 1/4] ci: add version step --- .github/workflows/version.yml | 61 +++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/version.yml diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml new file mode 100644 index 000000000..5c52df6b2 --- /dev/null +++ b/.github/workflows/version.yml @@ -0,0 +1,61 @@ +name: version + +on: + pull_request: + types: + - closed + branches: + - dev + +permissions: + contents: write + pull-requests: write + +jobs: + version_and_tag: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true && !contains(github.event.pull_request.title, 'chore(version)') + steps: + - name: Git Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + + - name: Setup Git User + uses: fregante/setup-git-user@v2 + + - name: Set SSH Key + uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}} + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version: "3.10.2" + + - name: Setup Melos + uses: bluefireteam/melos-action@v1 + with: + melos-version: "3.0.1" + + - name: Create git tag based on version + run: melos version --yes + + - name: Get latest tag + run: | + echo tag=$(git describe --tags `git rev-list --tags --max-count=1`) >> $GITHUB_OUTPUT + id: get-latest-tag + + - name: Push tag + run: git push origin ${{ steps.get-latest-tag.outputs.tag }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Pull Request on updated changelog and pubspec file. + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PAT }} + title: "chore(version): bump version and update changelog" + base: dev diff --git a/.gitignore b/.gitignore index 6f645b362..9a343921b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,8 @@ pubspec.lock .pub/ /build/ coverage/ +pubspec_overrides.yaml +pubspec.lock gradlew.bat From a031a79bd784ad31160e1474b5126239e95b036a Mon Sep 17 00:00:00 2001 From: sahani-deriv <125638269+sahani-deriv@users.noreply.github.com> Date: Tue, 21 Nov 2023 10:27:28 +0800 Subject: [PATCH 2/4] chore: stable version --- .gitignore | 3 +-- flutter_architecture_poc/example/pubspec.yaml | 2 +- packages/deriv_app_performance/pubspec.yaml | 2 +- packages/deriv_auth/pubspec.yaml | 3 +-- packages/deriv_auth_ui/example/pubspec.yaml | 2 +- packages/deriv_auth_ui/pubspec.yaml | 2 +- packages/deriv_banner/pubspec.yaml | 2 +- packages/deriv_bloc_manager/pubspec.yaml | 2 +- packages/deriv_datadog/example/pubspec.yaml | 2 +- packages/deriv_datadog/pubspec.yaml | 2 +- packages/deriv_date_range_picker/example/pubspec.yaml | 2 +- packages/deriv_date_range_picker/pubspec.yaml | 2 +- packages/deriv_env/pubspec.yaml | 2 +- packages/deriv_expandable_bottom_sheet/example/pubspec.yaml | 2 +- packages/deriv_expandable_bottom_sheet/pubspec.yaml | 2 +- packages/deriv_grouped_listview/example/pubspec.yaml | 2 +- packages/deriv_grouped_listview/pubspec.yaml | 2 +- packages/deriv_live_chat/example/pubspec.yaml | 2 +- packages/deriv_live_chat/pubspec.yaml | 2 +- packages/deriv_numpad/example/pubspec.yaml | 2 +- packages/deriv_numpad/pubspec.yaml | 2 +- packages/deriv_rudderstack/pubspec.yaml | 2 +- packages/deriv_store_launcher/pubspec.yaml | 2 +- packages/deriv_technical_analysis/pubspec.yaml | 2 +- packages/deriv_ui/pubspec.yaml | 2 +- packages/deriv_web_view/pubspec.yaml | 2 +- packages/form_builder/example/pubspec.yaml | 2 +- packages/form_builder/pubspec.yaml | 2 +- packages/update_checker/example/pubspec.yaml | 2 +- packages/update_checker/pubspec.yaml | 2 +- 30 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 9a343921b..bfc7f5b94 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,7 @@ pubspec.lock .pub/ /build/ coverage/ -pubspec_overrides.yaml -pubspec.lock +/packages/**/pubspec_overrides.yaml gradlew.bat diff --git a/flutter_architecture_poc/example/pubspec.yaml b/flutter_architecture_poc/example/pubspec.yaml index 51efe21c6..f1043ef69 100644 --- a/flutter_architecture_poc/example/pubspec.yaml +++ b/flutter_architecture_poc/example/pubspec.yaml @@ -1,7 +1,7 @@ name: example description: A new Flutter project. publish_to: "none" -version: 0.1.0 +version: 1.0.0 environment: sdk: ">=3.0.2 <4.0.0" diff --git a/packages/deriv_app_performance/pubspec.yaml b/packages/deriv_app_performance/pubspec.yaml index 70e646340..e35a2af9f 100644 --- a/packages/deriv_app_performance/pubspec.yaml +++ b/packages/deriv_app_performance/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_app_performance description: A new Flutter package project. -version: 0.0.1 +version: 1.0.0 homepage: environment: diff --git a/packages/deriv_auth/pubspec.yaml b/packages/deriv_auth/pubspec.yaml index 764862ae5..8788dda2c 100644 --- a/packages/deriv_auth/pubspec.yaml +++ b/packages/deriv_auth/pubspec.yaml @@ -1,7 +1,6 @@ name: deriv_auth description: Provides deriv authentication functionalities for dart/flutter apps. -version: 1.0.2 - +version: 1.0.0 publish_to: "none" environment: diff --git a/packages/deriv_auth_ui/example/pubspec.yaml b/packages/deriv_auth_ui/example/pubspec.yaml index 4c200936c..250d19afd 100644 --- a/packages/deriv_auth_ui/example/pubspec.yaml +++ b/packages/deriv_auth_ui/example/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_auth_ui/pubspec.yaml b/packages/deriv_auth_ui/pubspec.yaml index 32f15918a..d2adcf8d5 100644 --- a/packages/deriv_auth_ui/pubspec.yaml +++ b/packages/deriv_auth_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_auth_ui description: A flutter package for deriv auth UI flows. -version: 0.0.1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_banner/pubspec.yaml b/packages/deriv_banner/pubspec.yaml index 53b074ff2..ee733cb8e 100644 --- a/packages/deriv_banner/pubspec.yaml +++ b/packages/deriv_banner/pubspec.yaml @@ -1,7 +1,7 @@ name: deriv_banner description: A new flutter plugin project. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_bloc_manager/pubspec.yaml b/packages/deriv_bloc_manager/pubspec.yaml index 436956703..faa77549a 100644 --- a/packages/deriv_bloc_manager/pubspec.yaml +++ b/packages/deriv_bloc_manager/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_deriv_bloc_manager description: A package based on observer pattern and Service Locator pattern, for managing blocs in Flutter. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_datadog/example/pubspec.yaml b/packages/deriv_datadog/example/pubspec.yaml index a5173e927..5d2c9483e 100644 --- a/packages/deriv_datadog/example/pubspec.yaml +++ b/packages/deriv_datadog/example/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_datadog/pubspec.yaml b/packages/deriv_datadog/pubspec.yaml index 14c9a2898..514477401 100644 --- a/packages/deriv_datadog/pubspec.yaml +++ b/packages/deriv_datadog/pubspec.yaml @@ -1,7 +1,7 @@ name: deriv_datadog description: A wrapper around datadog_flutter_plugin to make it easier to use. -version: 0.0.1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_date_range_picker/example/pubspec.yaml b/packages/deriv_date_range_picker/example/pubspec.yaml index fe1efe76b..3288e3b1d 100644 --- a/packages/deriv_date_range_picker/example/pubspec.yaml +++ b/packages/deriv_date_range_picker/example/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_date_range_picker/pubspec.yaml b/packages/deriv_date_range_picker/pubspec.yaml index d24ac1883..9d043152d 100644 --- a/packages/deriv_date_range_picker/pubspec.yaml +++ b/packages/deriv_date_range_picker/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_date_range_picker description: A new Flutter package project. -version: 0.0.1 +version: 1.0.0 publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: diff --git a/packages/deriv_env/pubspec.yaml b/packages/deriv_env/pubspec.yaml index ef12510bc..eca07f929 100644 --- a/packages/deriv_env/pubspec.yaml +++ b/packages/deriv_env/pubspec.yaml @@ -1,7 +1,7 @@ name: deriv_env description: A package to load and store environment variables. -version: 0.0.1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_expandable_bottom_sheet/example/pubspec.yaml b/packages/deriv_expandable_bottom_sheet/example/pubspec.yaml index 29cae2a28..d7eed311e 100644 --- a/packages/deriv_expandable_bottom_sheet/example/pubspec.yaml +++ b/packages/deriv_expandable_bottom_sheet/example/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=2.16.2 <3.0.0" diff --git a/packages/deriv_expandable_bottom_sheet/pubspec.yaml b/packages/deriv_expandable_bottom_sheet/pubspec.yaml index cfa726683..1eb0e0fd7 100644 --- a/packages/deriv_expandable_bottom_sheet/pubspec.yaml +++ b/packages/deriv_expandable_bottom_sheet/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_expandable_bottom_sheet description: A new Flutter package project. -version: 0.0.1 +version: 1.0.0 publish_to: none environment: diff --git a/packages/deriv_grouped_listview/example/pubspec.yaml b/packages/deriv_grouped_listview/example/pubspec.yaml index 4cce8c527..71bba7c5e 100644 --- a/packages/deriv_grouped_listview/example/pubspec.yaml +++ b/packages/deriv_grouped_listview/example/pubspec.yaml @@ -2,7 +2,7 @@ name: example description: A new Flutter project. publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_grouped_listview/pubspec.yaml b/packages/deriv_grouped_listview/pubspec.yaml index d101c3fa3..d4d1726c8 100644 --- a/packages/deriv_grouped_listview/pubspec.yaml +++ b/packages/deriv_grouped_listview/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_grouped_listview description: A new Flutter package project. -version: 0.0.1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/deriv_live_chat/example/pubspec.yaml b/packages/deriv_live_chat/example/pubspec.yaml index 55f373117..17245b033 100644 --- a/packages/deriv_live_chat/example/pubspec.yaml +++ b/packages/deriv_live_chat/example/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_live_chat_example description: Demonstrates how to use the deriv_live_chat plugin. -version: 1.0.0+1 +version: 1.0.0 publish_to: "none" environment: diff --git a/packages/deriv_live_chat/pubspec.yaml b/packages/deriv_live_chat/pubspec.yaml index 0a33777ff..bec34aa8b 100644 --- a/packages/deriv_live_chat/pubspec.yaml +++ b/packages/deriv_live_chat/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_live_chat description: A plugin for live chat SDK support to dart. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_numpad/example/pubspec.yaml b/packages/deriv_numpad/example/pubspec.yaml index 2dc549031..220f87be0 100644 --- a/packages/deriv_numpad/example/pubspec.yaml +++ b/packages/deriv_numpad/example/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=2.16.2 <3.0.0" diff --git a/packages/deriv_numpad/pubspec.yaml b/packages/deriv_numpad/pubspec.yaml index b16596119..ee5695f28 100644 --- a/packages/deriv_numpad/pubspec.yaml +++ b/packages/deriv_numpad/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_numpad description: A new Flutter project. -version: 1.0.0+1 +version: 1.0.0 publish_to: "none" environment: diff --git a/packages/deriv_rudderstack/pubspec.yaml b/packages/deriv_rudderstack/pubspec.yaml index bdc9ae481..7492007f2 100644 --- a/packages/deriv_rudderstack/pubspec.yaml +++ b/packages/deriv_rudderstack/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_rudderstack description: A new Flutter plugin to wrap RudderStack SDK. -version: 1.1.0 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_store_launcher/pubspec.yaml b/packages/deriv_store_launcher/pubspec.yaml index c59960d45..146c52568 100644 --- a/packages/deriv_store_launcher/pubspec.yaml +++ b/packages/deriv_store_launcher/pubspec.yaml @@ -1,7 +1,7 @@ name: deriv_store_launcher description: A plugin to lunch app stores base on platform and manufacturer. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_technical_analysis/pubspec.yaml b/packages/deriv_technical_analysis/pubspec.yaml index 0aaac8236..7bdd5aced 100644 --- a/packages/deriv_technical_analysis/pubspec.yaml +++ b/packages/deriv_technical_analysis/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_technical_analysis description: A Dart package for Technical Analysis. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/deriv_ui/pubspec.yaml b/packages/deriv_ui/pubspec.yaml index 36734d6d8..202925333 100644 --- a/packages/deriv_ui/pubspec.yaml +++ b/packages/deriv_ui/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_ui description: A new Flutter package project. -version: 0.0.1 +version: 1.0.0 publish_to: none environment: diff --git a/packages/deriv_web_view/pubspec.yaml b/packages/deriv_web_view/pubspec.yaml index 80178e50c..0eab7b909 100644 --- a/packages/deriv_web_view/pubspec.yaml +++ b/packages/deriv_web_view/pubspec.yaml @@ -1,7 +1,7 @@ name: deriv_web_view description: Deriv Web View package project. -version: 0.0.1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/form_builder/example/pubspec.yaml b/packages/form_builder/example/pubspec.yaml index 354b218d1..0543927e9 100644 --- a/packages/form_builder/example/pubspec.yaml +++ b/packages/form_builder/example/pubspec.yaml @@ -2,7 +2,7 @@ name: form_builder_example description: An example project to demonstrate FormBuilder package. homepage: https://github.com/regentmarkets/flutter-deriv-packages publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/form_builder/pubspec.yaml b/packages/form_builder/pubspec.yaml index 586368416..5f69b84a2 100644 --- a/packages/form_builder/pubspec.yaml +++ b/packages/form_builder/pubspec.yaml @@ -2,7 +2,7 @@ name: form_builder description: A simpler and cleaner way to create, validate and submit forms. homepage: https://github.com/regentmarkets/flutter-deriv-packages publish_to: "none" -version: 1.0.0+1 +version: 1.0.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/packages/update_checker/example/pubspec.yaml b/packages/update_checker/example/pubspec.yaml index f3ff98718..5b15c9089 100644 --- a/packages/update_checker/example/pubspec.yaml +++ b/packages/update_checker/example/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -version: 1.0.0+1 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" diff --git a/packages/update_checker/pubspec.yaml b/packages/update_checker/pubspec.yaml index 9577e8206..32e5b7da2 100644 --- a/packages/update_checker/pubspec.yaml +++ b/packages/update_checker/pubspec.yaml @@ -1,6 +1,6 @@ name: update_checker description: Check and retrieve update information from the server for the given package. -version: 1.1.0 +version: 1.0.0 homepage: https://deriv.com/ publish_to: "none" From 72e9babb8e65a327ab749865a042035021fe4510 Mon Sep 17 00:00:00 2001 From: sahani-deriv <125638269+sahani-deriv@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:11:26 +0800 Subject: [PATCH 3/4] ci: fix checkout --- .github/workflows/version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 5c52df6b2..6cc3f40df 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -19,7 +19,7 @@ jobs: - name: Git Checkout uses: actions/checkout@v4 with: - token: ${{ secrets.PAT }} + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Setup Git User uses: fregante/setup-git-user@v2 From 529507f597ac77e13704570fbb94d7b9f6c5c85e Mon Sep 17 00:00:00 2001 From: sahani-deriv <125638269+sahani-deriv@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:54:38 +0800 Subject: [PATCH 4/4] ci: enable flutter cache --- .github/workflows/version.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 6cc3f40df..d286105a5 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -34,6 +34,7 @@ jobs: with: channel: "stable" flutter-version: "3.10.2" + cache: true - name: Setup Melos uses: bluefireteam/melos-action@v1