Skip to content

Commit

Permalink
Merge pull request #19 from leancodepl/chore/add-github-actions-mobile
Browse files Browse the repository at this point in the history
Chore/add GitHub actions mobile
  • Loading branch information
denis-lncd authored Dec 18, 2024
2 parents eb33f81 + d743afe commit f7de245
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/leancode_app_rating-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: leancode_app_rating publish

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

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

permissions:
id-token: write

defaults:
run:
working-directory: mobile

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

- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.5.3

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

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

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

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

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

defaults:
run:
working-directory: mobile

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

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

- name: Flutter version
run: flutter --version

- name: Download pub dependencies
run: flutter pub get

- name: Run analyzer
run: |
flutter analyze
- name: Dry run pub publish
# We don't want it to fail the CI, it's just to see how would `pub publish` behave.
run: flutter pub publish --dry-run || true

- uses: codecov/codecov-action@v1
with:
flags: leancode_app_rating
3 changes: 2 additions & 1 deletion mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ The showStarDialog function displays a dialog box allowing the user to provide a
In the current version of this package, you're not able to have a strong impact on how the dialogs look and how the flow works. You can apply your own texts and labels into `showStarDialog` and `showSingleAnswerDialog` methods. But at this moment, that's it.

[pub-badge]: https://img.shields.io/pub/v/leancode_app_rating.svg?logo=dart
[pub-badge-link]: https://pub.dev/packages/leancode_app_rating

[pub-badge-link]: https://pub.dev/packages/leancode_app_rating

0 comments on commit f7de245

Please sign in to comment.