Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
michalina-majewska committed Jun 20, 2024
1 parent 291bb55 commit f423d42
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: publish
name: publish leancode_cubit_utils

on:
push:
tags: ['v*']
tags: ['leancode_cubit_utils-v*']

jobs:
publish:
Expand All @@ -14,6 +14,10 @@ jobs:
id-token: write
contents: write

defaults:
run:
working-directory: packages/leancode_cubit_utils

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ name: leancode_cubit_utils test
on:
push:
branches: [main]
tags-ignore: ['v*']
tags-ignore: ['leancode_cubit_utils-v*']
paths:
- 'packages/leancode_cubit_utils/**'
pull_request:
branches: [main]
paths:
- 'packages/leancode_cubit_utils/**'

jobs:
test:
Expand All @@ -18,6 +22,10 @@ jobs:
include:
- version: '3.19.x'

defaults:
run:
working-directory: packages/leancode_cubit_utils

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/leancode_cubit_utils_cqrs-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: publish leancode_cubit_utils_cqrs

on:
push:
tags: ['leancode_cubit_utils_cqrs-v*']

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

defaults:
run:
working-directory: packages/leancode_cubit_utils_cqrs

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.2

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.19.x
cache: true

- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
54 changes: 54 additions & 0 deletions .github/workflows/leancode_cubit_utils_cqrs-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: leancode_cubit_utils_cqrs test

on:
push:
branches: [main]
tags-ignore: ['leancode_cubit_utils_cqrs-v*']
paths:
- 'packages/leancode_cubit_utils_cqrs/**'
pull_request:
branches: [main]
paths:
- 'packages/leancode_cubit_utils_cqrs/**'

jobs:
test:
name: Flutter ${{ matrix.version }}

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- version: '3.19.x'

defaults:
run:
working-directory: packages/leancode_cubit_utils_cqrs

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true

- name: Download pub dependencies
run: flutter pub get

- name: Check formatting
run: dart format --set-exit-if-changed --output none .

- name: Run analyzer
run: flutter analyze --fatal-warnings --fatal-infos

- name: Run tests
run: flutter test

- name: Dry run pub publish
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
with:
dry-run: true
3 changes: 1 addition & 2 deletions packages/leancode_cubit_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ version: 0.0.4
repository: https://github.com/leancodepl/leancode_cubit_utils

environment:
sdk: ">=3.1.0 <4.0.0"
sdk: '>=3.1.0 <4.0.0'

dependencies:
async: ^2.0.0
# cqrs: ^10.0.1
equatable: ^2.0.0
flutter:
sdk: flutter
Expand Down
7 changes: 4 additions & 3 deletions packages/leancode_cubit_utils_cqrs/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: leancode_cubit_utils_cqrs
description:
description: An extension of leancode_cubit_utils that provides cqrs support.
version: 0.0.1
repository: https://github.com/leancodepl/leancode_cubit_utils

environment:
sdk: ">=3.4.0 <4.0.0"
flutter: ">=1.17.0"
sdk: '>=3.4.0 <4.0.0'
flutter: '>=1.17.0'

dependencies:
cqrs: ^10.0.1
Expand All @@ -14,6 +14,7 @@ dependencies:
sdk: flutter
flutter_bloc: ^8.0.0
leancode_cubit_utils:
# Change after leancode_cubit_utils' new version is published
path: ../leancode_cubit_utils
leancode_hooks: ^0.0.6

Expand Down

0 comments on commit f423d42

Please sign in to comment.