diff --git a/.github/workflows/leancode_app_rating-publish.yml b/.github/workflows/leancode_app_rating-publish.yml new file mode 100644 index 0000000..5df365f --- /dev/null +++ b/.github/workflows/leancode_app_rating-publish.yml @@ -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 diff --git a/.github/workflows/leancode_app_rating-test.yml b/.github/workflows/leancode_app_rating-test.yml new file mode 100644 index 0000000..0952188 --- /dev/null +++ b/.github/workflows/leancode_app_rating-test.yml @@ -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 diff --git a/mobile/README.md b/mobile/README.md index afb5b4d..b0344e0 100644 --- a/mobile/README.md +++ b/mobile/README.md @@ -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 \ No newline at end of file + +[pub-badge-link]: https://pub.dev/packages/leancode_app_rating