Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: implement automated versioning #333

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Setup Git User
uses: fregante/setup-git-user@v2

- name: Set SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.10.2"
cache: true

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pubspec.lock
.pub/
/build/
coverage/
/packages/**/pubspec_overrides.yaml


gradlew.bat
Expand Down
2 changes: 1 addition & 1 deletion flutter_architecture_poc/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_app_performance/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deriv_app_performance
description: A new Flutter package project.
version: 0.0.1
version: 1.0.0
homepage:

environment:
Expand Down
3 changes: 1 addition & 2 deletions packages/deriv_auth/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_auth_ui/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_auth_ui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_banner/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_bloc_manager/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_datadog/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_datadog/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_date_range_picker/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_date_range_picker/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_env/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_expandable_bottom_sheet/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_grouped_listview/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_grouped_listview/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_live_chat/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_live_chat/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_numpad/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_numpad/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_rudderstack/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_store_launcher/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_technical_analysis/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_ui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_web_view/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/form_builder/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/form_builder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/update_checker/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/update_checker/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down