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

Chore/add GitHub actions mobile #19

Merged
merged 11 commits into from
Dec 18, 2024
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

27?

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
Loading